Search code examples
tinkerpop3datastax-enterprise-graph

Detect Cycles in a DSE graph


Using TinkerPop3 as the interface to a DSE graph. Is there any easy way to detect cycles in a graph or rather not visit an already visited vertex.

Specifically in my case, There is a "GROUP" vertex and there can be a group of groups. I will like to list all "USERS" in a group of groups.


Solution

  • Have you worked with the Gremlin steps SimplePath or ClyclicPath ? http://tinkerpop.apache.org/docs/3.3.1/reference/#cyclicpath-step

    SimplePath sounds like it will do what you are interested in doing.