| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ShortestPathAlg |
|
| 0.0;0 |
| 1 | /* | |
| 2 | This file is part of Combean. | |
| 3 | ||
| 4 | Combean is free software; you can redistribute it and/or modify | |
| 5 | it under the terms of the GNU General Public License as published by | |
| 6 | the Free Software Foundation; either version 2 of the License, or | |
| 7 | (at your option) any later version. | |
| 8 | ||
| 9 | Combean is distributed in the hope that it will be useful, | |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 | GNU General Public License for more details. | |
| 13 | ||
| 14 | You should have received a copy of the GNU General Public License | |
| 15 | along with Combean; if not, write to the Free Software | |
| 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 17 | */ | |
| 18 | /* | |
| 19 | * Created on 09.04.2005 | |
| 20 | * | |
| 21 | */ | |
| 22 | package net.sourceforge.combean.interfaces.graph.alg.spath; | |
| 23 | ||
| 24 | import net.sourceforge.combean.interfaces.graph.alg.GraphAlgorithm; | |
| 25 | import net.sourceforge.combean.interfaces.graph.containers.FixedEdgeMap; | |
| 26 | ||
| 27 | /** | |
| 28 | * The basic interface for the various kinds of shortest path algorithms. | |
| 29 | * | |
| 30 | * @author schickin | |
| 31 | * | |
| 32 | */ | |
| 33 | public interface ShortestPathAlg<NumType extends Comparable<NumType>> | |
| 34 | extends GraphAlgorithm { | |
| 35 | ||
| 36 | /** | |
| 37 | * Define the operations which are used to calculate the distance of a | |
| 38 | * node to the source. | |
| 39 | * | |
| 40 | * If this parameter is not set, the 'standard' algebra with numeric | |
| 41 | * values and the addition of doubles and the minimization as operations | |
| 42 | * for combining paths shall be taken. | |
| 43 | * | |
| 44 | * @param algebra the path algebra containing the required operations | |
| 45 | */ | |
| 46 | public void setAlgebra(PathAlgebra<NumType> algebra); | |
| 47 | ||
| 48 | /** | |
| 49 | * Set the weights of the edges of the graph. | |
| 50 | * | |
| 51 | * @param edgeWeights the map of the weights of the edges in the graph. | |
| 52 | */ | |
| 53 | public void setEdgeWeightMap(FixedEdgeMap<NumType> edgeWeights); | |
| 54 | ||
| 55 | /** | |
| 56 | * Enable/disable the calculation of the actual paths. | |
| 57 | * | |
| 58 | * If set to true, only the length of the shortest path | |
| 59 | * but not the path itself shall be calculated. Default value for this | |
| 60 | * parameter shall be false. Setting it to true may speed up the | |
| 61 | * calculation a bit. | |
| 62 | * | |
| 63 | * @param calcLengthOnly the new value of the calcLengthOnly flag. | |
| 64 | */ | |
| 65 | public void setCalcLengthOnly(boolean calcLengthOnly); | |
| 66 | ||
| 67 | /** | |
| 68 | * Return the value of the flag which enables/disables the calculation | |
| 69 | * of the actual paths. | |
| 70 | * | |
| 71 | * @return true if only the length but not the actual paths shall be | |
| 72 | * calculated. | |
| 73 | */ | |
| 74 | public boolean getCalcLengthOnly(); | |
| 75 | } |