net.walend.measured
Interface ShortestGEPaths

All Superinterfaces:
CEDigraph, Digraph, DigraphOfGEPaths, HasState, IndexedCEDigraph, IndexedDigraph
All Known Implementing Classes:
AbstractShortestGEPaths, DijkstraShortestGEPaths, FloydWarshallShortestGEPaths, GEBellmanFordTest, JITShortestGEPaths, JohnsonShortestGEPaths

public interface ShortestGEPaths
extends DigraphOfGEPaths

This interface is a DigraphOfGEPaths that contains the shortest paths in available in the base digraph as measured by a PathMeter.

Implementations should not have mutator methods except recalculate(). Implementations should not be Immutable unless both the base digraph and the pathMeter are immutable.

Constructors should have a base digraph, an appropriate PathMeter, and perhaps an underlying MutableCEDigraph. Constructors may throw a NegativeWeightCycleException.

Author:
David Walend dfw1@cornell.edu

Field Summary
 
Fields inherited from interface net.walend.digraph.CEDigraph
EMPTY
 
Method Summary
 int getLength(int from, int to)
           
 int getLength(java.lang.Object fromNode, java.lang.Object toNode)
           
 GEPathMeter getPathMeter()
          Return the path meter used to evaluate these shortest paths.
 MeasuredGEPath getShortestPath(int from, int to)
           
 MeasuredGEPath getShortestPath(java.lang.Object fromNode, java.lang.Object toNode)
           
 void recalculate()
          If the digraph is not valid, rediscover the shortest paths.
 boolean validLengths()
          Checks to make sure all the two node paths have lengths equal to or less than the lengths predicted by the path meter.
 
Methods inherited from interface net.walend.digraph.path.DigraphOfGEPaths
getBase, getPath, getPath, valid
 
Methods inherited from interface net.walend.digraph.IndexedCEDigraph
containsEdge, getEdge, getInboundEdges, getOutboundEdges, indexedEdgeIterator
 
Methods inherited from interface net.walend.digraph.IndexedDigraph
containsEdge, containsNode, countInboundEdges, countOutboundEdges, getFromIndices, getFromNodes, getNode, getNodeIndex, getToIndices, getToNodes, indexedEdgeNodeIterator, indexedNodeIterator, nodeCapacity, nodeIndices
 
Methods inherited from interface net.walend.digraph.Digraph
containsEdge, containsNode, containsNodes, countInboundEdges, countOutboundEdges, edgeCount, edgeNodeIterator, getFromNodes, getNodes, getToNodes, isEdgeFree, isEmpty, nodeCount, nodeIterator
 
Methods inherited from interface net.walend.collection.HasState
getPrincipleInterface, sameStateAs
 
Methods inherited from interface net.walend.digraph.CEDigraph
containsCEDigraph, containsEdge, edgeIterator, getEdge, getEdges, getInboundEdges, getOutboundEdges, intersectWithCEDigraph, sameCEDigraphAs, unionCEDigraph
 

Method Detail

validLengths

public boolean validLengths()
Checks to make sure all the two node paths have lengths equal to or less than the lengths predicted by the path meter. If a length is less than the path meter's prediction, makes sure that the path has more than two nodes.


recalculate

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

GENegativeWeightCycleException

getPathMeter

public GEPathMeter getPathMeter()
Return the path meter used to evaluate these shortest paths.


getShortestPath

public MeasuredGEPath getShortestPath(java.lang.Object fromNode,
                                      java.lang.Object toNode)
                               throws NodeMissingException
NodeMissingException

getShortestPath

public MeasuredGEPath getShortestPath(int from,
                                      int to)

getLength

public int getLength(java.lang.Object fromNode,
                     java.lang.Object toNode)
              throws NodeMissingException
NodeMissingException

getLength

public int getLength(int from,
                     int to)


Copyright (c) 2001, 2002, David Walend