net.sourceforge.combean.interfaces.graph.alg.spath
Interface ShortestPathAlg<NumType extends Comparable<NumType>>

Package class diagram package ShortestPathAlg
All Superinterfaces:
GraphAlgorithm
All Known Subinterfaces:
NegativeCycleDetectionAlg<NumType>, SingleSourceShortestPathAlg<NumType>, SingleSourceShortestPathWithNegCycleDetectionAlg<NumType>
All Known Implementing Classes:
AbstractLabellingAlg, BellmanFordAlg, BellmanFordWithNegCycleDetectionAlg

public interface ShortestPathAlg<NumType extends Comparable<NumType>>
extends GraphAlgorithm

The basic interface for the various kinds of shortest path algorithms.


Method Summary
 boolean getCalcLengthOnly()
          Return the value of the flag which enables/disables the calculation of the actual paths.
 void setAlgebra(PathAlgebra<NumType> algebra)
          Define the operations which are used to calculate the distance of a node to the source.
 void setCalcLengthOnly(boolean calcLengthOnly)
          Enable/disable the calculation of the actual paths.
 void setEdgeWeightMap(FixedEdgeMap<NumType> edgeWeights)
          Set the weights of the edges of the graph.
 
Methods inherited from interface net.sourceforge.combean.interfaces.graph.alg.GraphAlgorithm
getGraph, run, setGraph
 

Method Detail

setAlgebra

void setAlgebra(PathAlgebra<NumType> algebra)
Define the operations which are used to calculate the distance of a node to the source. If this parameter is not set, the 'standard' algebra with numeric values and the addition of doubles and the minimization as operations for combining paths shall be taken.

Parameters:
algebra - the path algebra containing the required operations

setEdgeWeightMap

void setEdgeWeightMap(FixedEdgeMap<NumType> edgeWeights)
Set the weights of the edges of the graph.

Parameters:
edgeWeights - the map of the weights of the edges in the graph.

setCalcLengthOnly

void setCalcLengthOnly(boolean calcLengthOnly)
Enable/disable the calculation of the actual paths. If set to true, only the length of the shortest path but not the path itself shall be calculated. Default value for this parameter shall be false. Setting it to true may speed up the calculation a bit.

Parameters:
calcLengthOnly - the new value of the calcLengthOnly flag.

getCalcLengthOnly

boolean getCalcLengthOnly()
Return the value of the flag which enables/disables the calculation of the actual paths.

Returns:
true if only the length but not the actual paths shall be calculated.