Algorithm
Development Kit 1.0

algs.model.network
Class BipartiteMatchingMinCost

java.lang.Object
  extended by algs.model.network.FlowNetwork<EdgeInfo[][]>
      extended by algs.model.network.FlowNetworkArray
          extended by algs.model.network.BipartiteMatchingMinCost

public class BipartiteMatchingMinCost
extends FlowNetworkArray

A graph represents provide nodes that are to be matched with an equal number of requirer nodes. Capacity for each edge is 1 and flow determines if match was selected. Enables the code to compute maxFlow/MinCost to operate immediately on Bipartite Matching problems.


Field Summary
 
Fields inherited from class algs.model.network.FlowNetwork
numVertices, sinkIndex, sourceIndex
 
Constructor Summary
BipartiteMatchingMinCost(DisjointPairs pr)
          Construct a Bipartite Matching problem instance from the information contained within the DisjointPairs class.
 
Method Summary
 void output()
          Show the matching.
 
Methods inherited from class algs.model.network.FlowNetworkArray
edge, getCost, getEdgeStructure, getFlow, getMinCut, populate, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BipartiteMatchingMinCost

public BipartiteMatchingMinCost(DisjointPairs pr)
Construct a Bipartite Matching problem instance from the information contained within the DisjointPairs class.

Parameters:
pr -
Method Detail

output

public void output()
Show the matching.


Algorithm Development Kit 1.0

This code supports the Algorithms in a Nutshell book, published by O'Reilly Media, Inc. in November 2008. Please visit the book web page to learn of any changes to the code repository or to record a potential defect.