Coverage Report - net.sourceforge.combean.interfaces.graph.alg.flow.MinCostFlowAlg
 
Classes in this File Line Coverage Branch Coverage Complexity
MinCostFlowAlg
N/A
N/A
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 30.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  
  * A min-cost flow algorithm (with positive flows in the range 0 ... capacity).
 28  
  * 
 29  
  * @author schickin
 30  
  *
 31  
  */
 32  
 public interface MinCostFlowAlg extends FeasibleFlowAlg {
 33  
     
 34  
     /**
 35  
      * Set the cost of one unit of flow for each edge. If this map is not
 36  
      * set, the cost is assumed to be zero for each edge.
 37  
      * 
 38  
      * @param edgeWeights a map containing the cost of each edge in the graph
 39  
      */
 40  
     public void setEdgeWeightsMap(FixedDoubleEdgeMap edgeWeights);
 41  
 
 42  
     /**
 43  
      * Calculate the total cost of the flow. May only be called after the
 44  
      * algorithm has been executed.
 45  
      * 
 46  
      * @return the total cost of the flow.
 47  
      */
 48  
     double getTotalCost();
 49  
 }