简体   繁体   中英

Jung graph library: how to search vertices based on vertex property?

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?

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 (eg, a Map from tag values to a set of vertices).

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM