algs.model.network
Class Assignment
java.lang.Object
algs.model.network.FlowNetwork<EdgeInfo[][]>
algs.model.network.FlowNetworkArray
algs.model.network.Transshipment
algs.model.network.Transportation
algs.model.network.Assignment
public class Assignment
- extends Transportation
Given a bipartite graph of provider nodes P, requirer nodes R, and edge costs c(i,j)
for assigning a provider pi to a requirer ri. Goal is to maximize the number of
job assignments while minimizing the overall costs.
The resulting Flow Network has m + n + 2 nodes. Note that the shipping
"cost" from the virtual new source and new target are zero. All edges store the shipping
cost, in addition to the flow and capacity constraints.
If a particular assignment is not possible then the cost should be Integer.MAX_VALUE.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Assignment
public Assignment(int[][] costs)
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.