net.walend.measured
Class JohnsonShortestCEDistances

java.lang.Object
  |
  +--net.walend.measured.AbstractShortestCEDistances
        |
        +--net.walend.measured.DijkstraShortestCEDistances
              |
              +--net.walend.measured.JohnsonShortestCEDistances
All Implemented Interfaces:
HasState, java.io.Serializable, ShortestCEDistances

public class JohnsonShortestCEDistances
extends DijkstraShortestCEDistances
implements ShortestCEDistances, java.io.Serializable

JohnsonShortestCEDistances uses Johnson's algorithm to find the shortest distances during construction.

Author:
David Walend dfw1@cornell.edu
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class net.walend.measured.DijkstraShortestCEDistances
 
Field Summary
 
Fields inherited from class net.walend.measured.DijkstraShortestCEDistances
 
Fields inherited from class net.walend.measured.AbstractShortestCEDistances
 
Constructor Summary
JohnsonShortestCEDistances(IndexedCEDigraph ceDigraph, CEPathMeter pathMeter)
           
 
Method Summary
private  void johnson()
           
 void recalculate()
          If the digraph is not valid, rediscover the shortest distances.
 
Methods inherited from class net.walend.measured.DijkstraShortestCEDistances
createNode, dijkstra, initWithNodesFrom
 
Methods inherited from class net.walend.measured.AbstractShortestCEDistances
bfTest, getBase, getLength, getLength, getPathMeter, getPrincipleInterface, initializeDistances, relax, safeLength, sameStateAs, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.walend.measured.ShortestCEDistances
getBase, getLength, getLength, getPathMeter
 
Methods inherited from interface net.walend.collection.HasState
getPrincipleInterface, sameStateAs
 

Constructor Detail

JohnsonShortestCEDistances

public JohnsonShortestCEDistances(IndexedCEDigraph ceDigraph,
                                  CEPathMeter pathMeter)
                           throws CENegativeWeightCycleException
Method Detail

johnson

private void johnson()

recalculate

public void recalculate()
                 throws CENegativeWeightCycleException
If the digraph is not valid, rediscover the shortest distances.

Specified by:
recalculate in interface ShortestCEDistances
Specified by:
recalculate in class AbstractShortestCEDistances
CENegativeWeightCycleException


Copyright (c) 2001, 2002, David Walend