Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
MulticommodityCapable |
|
| 1.0;1 |
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 31.08.2005 | |
20 | * | |
21 | */ | |
22 | package net.sourceforge.combean.interfaces.graph.alg.flow; | |
23 | ||
24 | import net.sourceforge.combean.interfaces.graph.containers.doubleval.FixedDoubleEdgeMap; | |
25 | ||
26 | /** | |
27 | * This interface may be combined with single commodity flow interfaces, | |
28 | * turning them into the equivalent multicommodity flow variant. | |
29 | * | |
30 | * @author schickin | |
31 | * | |
32 | */ | |
33 | public interface MulticommodityCapable { | |
34 | ||
35 | /** | |
36 | * Define the number of commodities. Must be called before any call | |
37 | * to focusOnCommodity. Default is one. | |
38 | * | |
39 | * @param numCommodities | |
40 | */ | |
41 | public void setNumCommodities(int numCommodities); | |
42 | ||
43 | /** | |
44 | * All subsequent calls for a single commodity (e.g. setting the edge | |
45 | * weight, the inflow or the individual capacitiy) refer to the given | |
46 | * commodity. | |
47 | * | |
48 | * @param numCommodity the commodity to which all subsequent calls | |
49 | * shall refer. | |
50 | */ | |
51 | public void focusOnCommodity(int numCommodity); | |
52 | ||
53 | /** | |
54 | * Set the edge capacities for the sum of the flows. | |
55 | * | |
56 | * @param edgeCapacities a map containing the edge capacities. | |
57 | */ | |
58 | public void setCommonEdgeCapacityMap(FixedDoubleEdgeMap edgeCapacities); | |
59 | } |