cz.cuni.amis.pathfinding.alg.floydwarshall
Class FloydWarshall.PathMatrixNode<N>

Package class diagram package FloydWarshall.PathMatrixNode
java.lang.Object
  extended by cz.cuni.amis.pathfinding.alg.floydwarshall.FloydWarshall.PathMatrixNode<N>
Type Parameters:
N -
Enclosing class:
FloydWarshall<NODE>

public static class FloydWarshall.PathMatrixNode<N>
extends Object

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.

Author:
Jimmy

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

FloydWarshall.PathMatrixNode

public FloydWarshall.PathMatrixNode()
Doesn't leading anywhere


FloydWarshall.PathMatrixNode

public FloydWarshall.PathMatrixNode(int cost)
Method Detail

getBytesAprox

public int getBytesAprox()
Returns aprox. number of bytes used by this class (for 32-bit Java, might be as twice as much for 64-bit!) including currently cached path.

Returns:

getBytesAproxWithoutPath

public int getBytesAproxWithoutPath()
Returns aprox. number of bytes used by this class (for 32-bit Java, might be as twice as much for 64-bit!) EXCLUDING currently cached path.

Returns:

getPathCost

public int getPathCost()
Returns the cost of the path between nodes, if the path does not exist, returns Integer.MAX_VALUE.

Returns:

setPathCost

public void setPathCost(int cost)
Sets the cost of the path between nodes.

Parameters:
cost -

getViaNode

public Integer getViaNode()
Returns the node you have to travel through.

Returns:

setViaNode

public void setViaNode(Integer indice)
Sets the node you have to travel through.

Parameters:
indice -

getPath

public List<N> getPath()
Returns the full path between nodes.

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.

Returns:

setPath

public void setPath(List<N> path)
Sets the full path between nodes, computed as the last step of FloydWarshall.performFloydWarshall(List). Such path is going to be stored using SoftReference (cached) and might be freed by GC if heap runs dry.

Parameters:
path -


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.