public interface ILcdDistanceFunction<N,E>
ILcdDistanceFunction
calculates distances between two given nodes. This distance
can be of all kinds: it can be an exact distance, or an estimate, an Euclidean distance or a time
cost, ...Modifier and Type  Method and Description 

double 
computeDistance(ILcdGraph<N,E> aGraph,
ILcdRoute<N,E> aPrecedingRoute,
ILcdRoute<N,E> aSucceedingRoute,
TLcdTraversalDirection aTraversalDirection)
Returns the distance between the end node of
aPrecedingRoute and the start node of
aSucceedingRoute . 
int 
getOrder()
Returns the order of this function.

double computeDistance(ILcdGraph<N,E> aGraph, ILcdRoute<N,E> aPrecedingRoute, ILcdRoute<N,E> aSucceedingRoute, TLcdTraversalDirection aTraversalDirection)
aPrecedingRoute
and the start node of
aSucceedingRoute
.aPrecedingRoute
 the route whose end node is the first of the two nodes between which a
distance is to be calculated. Only the last n
edges of
this route will have an influence on the result, where n
is equal to the order of this distance function. The route should be
completely contained in the given graph, otherwise the correct
behavior of this method is not guaranteed.aSucceedingRoute
 the route whose start node is the second of the two nodes between which
a distance is to be calculated. Only the first n
edges of
this route will have an influence on the result, where n
is equal to the order of this distance function. The route should be
completely contained in the given graph, otherwise the correct
behavior of this method is not guaranteed.aTraversalDirection
 indicating whether the traversal direction should be forward or backward.
If BACKWARD
, the given routes will be traversed in
opposite direction, and the preceding route becomes thus the
succeeding route and vice versa.double
indicating the distance between the end node of
aPrecedingRoute
and the start node of aSucceedingRoute
.int getOrder()
E.g. a simple cartesian distance function has order 0, because it doesn't use any other information than the distance between the endpoint of the preceding route and the start node of the succeeding route. Other, more complex functions can have a higher order.