Interface Algorithm.GraphTraversalContextCalculator<A,B,C>

Enclosing interface:
Algorithm
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Algorithm.GraphTraversalContextCalculator<A,B,C>
Functional interface for a function answering the question "What must be the context of the node being added considering we know the added arc, the added node itself, and the context of the already traversed node adjacent to this arc?"

Example of implementation for context of type Double:

(addedArc, addedNode, addedArcDirection, prevNodeContext) -> prevNodeContext + addedArc.getValue().getLength()

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    calculateNextNodeContext(Graph<A,B>.Arc addedArc, Graph<A,B>.Node addedNode, Algorithm.ArcRelativeDirection addedArcDirection, C prevNodeContext)
    Function answering the question "What must be the context of the node being added considering we know the added arc, the added node itself, and the context of the already traversed node adjacent to this arc?"