문제

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

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top