|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pathfinding.alg.floydwarshall.FloydWarshall.PathMatrixNode<N>
N
- public static class FloydWarshall.PathMatrixNode<N>
Class describing cell inside the FloydWarshall matrix holding additional informations relating to the path between two nodes.
These nodes are stored under "indices" inside FloydWarshall.pathMatrix
.
Constructor Summary | |
---|---|
FloydWarshall.PathMatrixNode()
Doesn't leading anywhere |
|
FloydWarshall.PathMatrixNode(int cost)
|
Method Summary | |
---|---|
int |
getBytesAprox()
Returns aprox. |
int |
getBytesAproxWithoutPath()
Returns aprox. |
List<N> |
getPath()
Returns the full path between nodes. |
int |
getPathCost()
Returns the cost of the path between nodes, if the path does not exist, returns Integer.MAX_VALUE . |
Integer |
getViaNode()
Returns the node you have to travel through. |
void |
setPath(List<N> path)
Sets the full path between nodes, computed as the last step of FloydWarshall.performFloydWarshall(List) . |
void |
setPathCost(int cost)
Sets the cost of the path between nodes. |
void |
setViaNode(Integer indice)
Sets the node you have to travel through. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FloydWarshall.PathMatrixNode()
public FloydWarshall.PathMatrixNode(int cost)
Method Detail |
---|
public int getBytesAprox()
public int getBytesAproxWithoutPath()
public int getPathCost()
Integer.MAX_VALUE
.
public void setPathCost(int cost)
cost
- public Integer getViaNode()
public void setViaNode(Integer indice)
indice
- public List<N> getPath()
WARNING: this is cached path! Might return null even though such path exists! Use FloydWarshall.getPath(Object, Object)
to obtain the result in every case.
public void setPath(List<N> path)
FloydWarshall.performFloydWarshall(List)
. Such path
is going to be stored using SoftReference
(cached) and might be freed by GC if heap runs dry.
path
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |