 | HungarianAlgorithmFindAssignments Method |
Given a matrix of worker costs and tasks, find the optimal allocation of workers such that the total cost is minimized.
Namespace:
Kit.Algorithms
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0
Syntaxpublic static int[] FindAssignments(
this int[,] costs
)
Request Example
View SourceParameters
- costs
- Type: SystemInt32
A 2D-matrix where the element at [i, j] represents the cost of worker i doing task j.
Return Value
Type:
Int32An array where the value at index i is the index of the task assigned to worker i.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions
See Also