net.walend.measured
Class JohnsonShortestGEDistances

java.lang.Object
  |
  +--net.walend.measured.AbstractShortestGEDistances
        |
        +--net.walend.measured.DijkstraShortestGEDistances
              |
              +--net.walend.measured.JohnsonShortestGEDistances
All Implemented Interfaces:
HasState, java.io.Serializable, ShortestGEDistances

public class JohnsonShortestGEDistances
extends DijkstraShortestGEDistances
implements ShortestGEDistances, java.io.Serializable

JohnsonShortestGEDistances 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.DijkstraShortestGEDistances
 
Field Summary
 
Fields inherited from class net.walend.measured.DijkstraShortestGEDistances
 
Fields inherited from class net.walend.measured.AbstractShortestGEDistances
 
Constructor Summary
JohnsonShortestGEDistances(IndexedGEDigraph geDigraph, GEPathMeter 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.DijkstraShortestGEDistances
createNode, dijkstra, initWithNodesFrom
 
Methods inherited from class net.walend.measured.AbstractShortestGEDistances
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.ShortestGEDistances
getBase, getLength, getLength, getPathMeter
 
Methods inherited from interface net.walend.collection.HasState
getPrincipleInterface, sameStateAs
 

Constructor Detail

JohnsonShortestGEDistances

public JohnsonShortestGEDistances(IndexedGEDigraph geDigraph,
                                  GEPathMeter pathMeter)
                           throws GENegativeWeightCycleException
Method Detail

johnson

private void johnson()

recalculate

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

Specified by:
recalculate in interface ShortestGEDistances
Specified by:
recalculate in class AbstractShortestGEDistances
GENegativeWeightCycleException


Copyright (c) 2001, 2002, David Walend