|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PathMeters measure the cost to enter and leave nodes and cross edges. These are most often used by other algorithms to find the cost of travelling a specific CEPath. Write one of these and feed it to the algorithm with the path or directed graph.
For GEDigraphs and GEPaths, the costToCross method will receive the GENERICEDGE object.
If a method receives an argument that it can not evaluate, throw an IllegalArgumentException. If your PathMeter really only works with doubles and converting to an int makes no sense, throw an UnsupportedOperationException where the method returns an int. Else, describe what rounding rules you are using.
Field Summary | |
static java.lang.Object |
GENERICEDGE
A marker object for working with GEDigraphs and GEPaths. |
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()
Returns true if this PathMeter can return negative weight edges, false if not. |
Field Detail |
public static final java.lang.Object GENERICEDGE
Method Detail |
public double costToCross(java.lang.Object fromNode, java.lang.Object toNode, java.lang.Object edge)
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)
edge
- is the edge object. In a generic-edge path or digraph, this will be GENERICEDGE.public boolean negativeWeightEdges()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |