Interface ILcdComplexEdgeValueFunction<N,E>

Type Parameters:
N - the node class
E - the edge class
All Superinterfaces:
ILcdEdgeValueFunction<N,E>

public interface ILcdComplexEdgeValueFunction<N,E> extends ILcdEdgeValueFunction<N,E>
An edge value function providing access to the sequences of edges that have a special edge value (that is, a sequence of edges for which the traversal cost is not equal to the sum of the edge values of the individual edges).

A typical example is a turn restriction on a road: the individual traversal cost of the two roads involved in a turn is their length, while the sequence of the two roads has cost Double.POSITIVE_INFINITY (prohibited), instead of the sum of the two roads lengths.

This interface allows algorithms and preprocessors to quickly retrieve all special edge sequences, without having to test every single combination of edges.

Since:
9.1
  • Method Details

    • getComplexEdgeSequences

      List<ILcdRoute<N,E>> getComplexEdgeSequences(ILcdGraph<N,E> aGraph, E aEdge)
      Returns the list with all routes for which the cost of adding the specified edge is different from the edge value of that edge itself. The specified edge should not be included in the returned routes.

      A typical example is a turn restriction on a road: if it is not allowed to drive into a road B coming from a road A, this function should return a List containing a single route with road B, if A is the specified edge (and possibly other routes if it also disallowed to drive into A coming from other roads). If the turn restriction also applies in the other direction, a List containing a single route with road A should be returned if B is the specified edge.

      Parameters:
      aGraph - the graph the edge is part of.
      aEdge - the edge for which to return special edge sequences.
      Returns:
      a list, containing all sequences of edges for which the cost of adding the specified edge is different from the edge value of that edge itself.