You mean in general? I think toposort is only defined for trees? You can ignore the loops though in a traversal description (Uniqueness.Relationship-Global) and in theory start at any random node in the graph to find the topologically first (tree-root).
On Wed, Jun 4, 2014 at 6:50 AM, TC <[email protected]> wrote: > Does neo4j has topological sort function for directed graph data(with > loops)? > If I follow > for ( Path position : db.traversalDescription() > .depthFirst() > .relationships( Rels.LIKES, Direction.INCOMING ) > .traverse( node ) ) > but how to choose the starting node in topo sort order for this graph? > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
