org.jscience.architecture.traffic.algorithms.edit
Class ShortestPathCalculator

java.lang.Object
  extended by org.jscience.architecture.traffic.algorithms.edit.ShortestPathCalculator

public class ShortestPathCalculator
extends java.lang.Object

This class will determine for each node for each exitnode what lanes are on a shortest path towards it.


Constructor Summary
ShortestPathCalculator()
          The constructor for a shortest path calculator.
 
Method Summary
 void calcAllShortestPaths(Infrastructure infra)
          Calculates all the shortest paths for each EdgeNode in the Infrastructure.
 int findNearestAvailableNode()
          Find the nearest which can be choosen as an alternative destination
 int findNearestAvailableNode(int nodeId)
          Find the nearest which can be choosen as an alternative destination
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShortestPathCalculator

public ShortestPathCalculator()
The constructor for a shortest path calculator.

Method Detail

calcAllShortestPaths

public void calcAllShortestPaths(Infrastructure infra)
                          throws InfraException
Calculates all the shortest paths for each EdgeNode in the Infrastructure.

Parameters:
infra - The Infrastructure of which the shortest paths should be calculated.
Throws:
InfraException - DOCUMENT ME!

findNearestAvailableNode

public int findNearestAvailableNode(int nodeId)
Find the nearest which can be choosen as an alternative destination

Parameters:
nodeId - Id of the current node
Returns:
The node found

findNearestAvailableNode

public int findNearestAvailableNode()
Find the nearest which can be choosen as an alternative destination

Returns:
The node found