|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.measured.SimpleCEPathMeter
This simple path meter returns 1 for the cost to cross an edge and 0 for everything else.
Field Summary |
Fields inherited from interface net.walend.measured.CEPathMeter |
GENERICEDGE |
Constructor Summary | |
SimpleCEPathMeter()
|
Method Summary | |
double |
costToCross(java.lang.Object fromNode,
java.lang.Object toNode,
java.lang.Object edge)
The cost to cross an edge. |
int |
intCostToCross(java.lang.Object fromNode,
java.lang.Object toNode,
java.lang.Object edge)
The cost to cross an edge. |
boolean |
negativeWeightEdges()
Since the cost to cross any edge is 0 or 1, this always returns false. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleCEPathMeter()
Method Detail |
public double costToCross(java.lang.Object fromNode, java.lang.Object toNode, java.lang.Object edge)
costToCross
in interface CEPathMeter
edge
- is the edge object. In a generic-edge path or digraph, this will be GENERICEDGE.public int intCostToCross(java.lang.Object fromNode, java.lang.Object toNode, java.lang.Object edge)
intCostToCross
in interface CEPathMeter
edge
- is the edge object. In a generic-edge path or digraph, this will be GENERICEDGE.public boolean negativeWeightEdges()
Returns true if this PathMeter can return negative weight edges, false if not. Shortest path algorithms use this method to trigger the bellman-ford algorithm to detect negative weight cycles. If you're not sure, return true.
negativeWeightEdges
in interface CEPathMeter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |