Package com.luciad.network.function
Interface ILcdEdgeValueFunction<N,E>
- All Known Subinterfaces:
ILcdComplexEdgeValueFunction<N,
E>
- All Known Implementing Classes:
ALcdNodeValueFunction
,ALcdSimpleEdgeValueFunction
,ALcdTurnValueFunction
,TLcdCompositeEdgeValueFunction
public interface ILcdEdgeValueFunction<N,E>
An
ILcdEdgeValueFunction
is a general function which returns values associated with
edges in a graph. Those values can describe all kinds of information: lengths, travel times,
tracing capacities, ...
The ILcdEdgeValueFunction
will only behave correctly if at least one of the two
following conditions is met:
- there are no loops in the graph (i.e. no edges with identical start and end node)
- or the
ILcdEdgeValueFunction
is fully symmetrical (i.e. the edge value in positive direction is the same as in negative direction, for all edges).
- Since:
- 5.1
-
Method Summary
Modifier and TypeMethodDescriptiondouble
computeEdgeValue
(ILcdGraph<N, E> aGraph, ILcdRoute<N, E> aPrecedingRoute, E aEdge, TLcdTraversalDirection aTraversalDirection) Returns the value associated withaEdge
.int
getOrder()
Returns the order of this function.
-
Method Details
-
computeEdgeValue
double computeEdgeValue(ILcdGraph<N, E> aGraph, ILcdRoute<N, E> aPrecedingRoute, E aEdge, TLcdTraversalDirection aTraversalDirection) Returns the value associated withaEdge
.- Parameters:
aGraph
- the graph from which the edge is part.aPrecedingRoute
- the route, to which the edge connects (i.e. the end node of this route is one of the two nodes connected by the edge). Depending on the function, the information used from this route in the calculation of the edge value can differ: a simple distance function will not use any information from this route, while a turn function which describes a relationship between two succeeding edges will typically use the last edge of the route in its calculation. The route should be completely contained in the given graph, otherwise the correct behavior of this method is not guaranteed.aEdge
- the edge for which a value should be returned. This edge should be part of the given graph and adjacent to the end of the given route, otherwise the correct behavior of this method is not guaranteed.aTraversalDirection
- indicating whether the traversal direction should be forward or backward. IfBACKWARD
, the given edge will be traversed in opposite direction, and the preceding route becomes thus the succeeding route and vice versa.- Returns:
- the value associated with
aEdge
-
getOrder
int getOrder()Returns the order of this function. The order of a edge function is the maximum number of preceding edges which are taken into account when calculating a edge value. E.g. a simple cartesian distance function has order 0, because it doesn't use any other information than the edge length itself; a function which implements turn rules in traffic, will typically be of order 1, because it takes only the first preceding edge into account (i.e. de road from which the vehicle came from when entering the next road). Other, more complex functions can have a higher order.- Returns:
- the order of this function.
-