Question

I am working with Jung framework to maintain and visualize my directed graph. My vertex and edge are custom classes. In the vertex class I maintain a set of vertex properties like, tag, state, etc.

I need to search the graph for vertex with specific property. For example, if a tag is given, i need to search the graph to find the vertex that hold that tag. I am not sure how to do it efficiently.

any help?

Was it helpful?

Solution

JUNG does not, itself, maintain indexes of your vertex tags, because it doesn't know anything about them. You will need to construct and maintain your own indexes (e.g., a Map from tag values to a set of vertices).

Note that this is not a JUNG-specific question at all, really.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top