Hi,
I'm trying to use TraversalAStar to find the shortest path in my graph. The
problem I'm facing is that I need a cost evaluator which doesn't depend
only on the current relationship being evaluated, but I need to take into
consideration even one previous relationship (if there is any).
I'm trying to implement CostEvaluator<Double> interface which has following
signature:
public interface CostEvaluator<T> {
T getCost( Relationship relationship, Direction direction );
}
What I actually need in the getCost() method is, to have an access to the
relationship prior this relationship (or more generally to the whole path
up to this relationship).
"Drawing" a picture as following:
(A)--REL1-->(B)--REL2-->(C)--REL3-->(D)
When the cost evaluator is being triggered on the REL3 relationship, I need
access to the properties of the REL2 as well, to be able to properly
calculate the cost for REL3. Any idea how I can achieve that?
Thanks for any help.
--
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.