|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.graph.EdgeValue
A object which can hold generic edge values.
Constructor Summary | |
EdgeValue()
|
|
EdgeValue(double cost,
double time,
double distance)
Constructs a new edge value object with explicit values. |
|
EdgeValue(EdgeValueI value)
Constructs a new edge value object with explicit values. |
Method Summary | |
double |
getCost(boolean reverse)
Returns the cost of crossing the edge in the indicated direction. |
double |
getDistance(boolean reverse)
Returns the distance across the edge in the indicated direction. |
double |
getTime(boolean reverse)
Returns the time required to cross the edge in the indicated direction. |
void |
set(double cost,
double time,
double distance)
Sets the default values for the edge. |
void |
setCost(boolean reverse,
double cost)
Sets the cost of crossing the edge in the indicated direction. |
void |
setDistance(boolean reverse,
double distance)
Sets the distance across the edge in the indicated direction. |
void |
setTime(boolean reverse,
double time)
Sets the time to cross the edge in the indicated direction. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public EdgeValue()
public EdgeValue(EdgeValueI value)
public EdgeValue(double cost, double time, double distance)
Method Detail |
public double getCost(boolean reverse)
reverse
- is set to true if the traversal starts at the 'to' end of the edge and stops at the 'from' end, this can only happen if the edge is undirected.public double getTime(boolean reverse)
reverse
- is set to true if the traversal starts at the 'to' end of the edge and stops at the 'from' end, this can only happen if the edge is undirected.public double getDistance(boolean reverse)
reverse
- is set to true if the traversal starts at the 'to' end of the edge and stops at the 'from' end, this can only happen if the edge is undirected.public void set(double cost, double time, double distance)
public void setCost(boolean reverse, double cost)
reverse
- is set to true if the traversal starts at the 'to' end of the edge and stops at the 'from' end, this can only happen if the edge is undirected.public void setTime(boolean reverse, double time)
reverse
- is set to true if the traversal starts at the 'to' end of the edge and stops at the 'from' end, this can only happen if the edge is undirected.public void setDistance(boolean reverse, double distance)
reverse
- is set to true if the traversal starts at the 'to' end of the edge and stops at the 'from' end, this can only happen if the edge is undirected.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |