[jgrapht-developers] obtaining neighbor sets
Brought to you by:
barak_naveh,
perfecthash
From: Charles F. <cf...@us...> - 2005-12-12 19:37:25
|
Hi, The other new feature I wanted to work on was effeciently obtaining (caching) nieghbor sets. Currently it is unnecessarily expensive to obtain a node's neighbors. You can see full details at feature request number 1376875. John suggested that this be implemented as a GraphListener. I thought it could be named NeighborListener or something like that. The static method could match that from GraphHelper except that for efficiency I would have liked it to return a Set instead of a List: Set neighborListOf(Graph g, Object vertex); Would I want two different classes, one for undirected graphs, and one for directed graphs (predecessorListOf and successorListOf)? Thanks for any advice and suggestions. Charles -- Hardly a driver Is now alive Who passed On hills At 75 Burma-Shave http://burma-shave.org/jingles/1939/hardly_a_driver |