The graph maybe has loop inside and multiple source node(no incoming edges). Even using traversal description (Uniqueness.Relationship-Global), it will need a starting node from users to begin. So it cannot deal with multiple source node graph. like figure in this wiki page:http://en.wikipedia.org/wiki/Topological_sorting
On Tuesday, June 3, 2014 11:12:21 PM UTC-7, Michael Hunger wrote: > > 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] <javascript:>> > 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] <javascript:>. >> 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.
