|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.walend.measured.SimpleGEPathMeter
This simple path meter returns 1 for the cost to cross an edge and 0 for everything else.
Constructor Summary | |
SimpleGEPathMeter()
|
Method Summary | |
double |
costToCross(java.lang.Object fromNode,
java.lang.Object toNode)
The cost to cross an edge. |
int |
intCostToCross(java.lang.Object fromNode,
java.lang.Object toNode)
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 SimpleGEPathMeter()
Method Detail |
public double costToCross(java.lang.Object fromNode, java.lang.Object toNode)
costToCross
in interface GEPathMeter
public int intCostToCross(java.lang.Object fromNode, java.lang.Object toNode)
intCostToCross
in interface GEPathMeter
public boolean negativeWeightEdges()
Returns true if this GEPathMeter 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 GEPathMeter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |