During a traversal, is there a way of accessing the relationship that
is last traversed before a traverser decides that it has been to a
node before. So if a depth first traverser follows the following
triplets (all of the same relationship type):

A --> B
B --> C
B --> D
A --> E
E --> B
E --> F

I think the traverser from A will return A, B, C, D, E, F in that
order. Is there any easy way from the traverser to tell that E is
related to B directly, and to retrieve that relationship, as part of
the traversal? I am trying to generate a tree (including duplicate
branches, but breaking cycles) out of the graph given a starting point
and I am having to fall back on recursive parent-child walking which
is doable but not hugely efficient probably.

I think I am looking for a traverser that returns an iterator of
Relationships rather than of Nodes.

Is there an easier way?

Rob.
_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to