N - public static class FloydWarshall.PathMatrixNode<N> extends Object
These nodes are stored under "indices" inside FloydWarshall.pathMatrix.
| Constructor and Description |
|---|
PathMatrixNode()
Doesn't leading anywhere
|
PathMatrixNode(int cost) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBytesAprox()
Returns aprox. number of bytes used by this class (for 32-bit Java, might be as twice as much for 64-bit!)
|
int |
getBytesAproxWithoutPath()
Returns aprox. number of bytes used by this class (for 32-bit Java, might be as twice as much for 64-bit!)
|
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.
|
public PathMatrixNode()
public PathMatrixNode(int cost)
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 - Copyright © 2019 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.