HungarianHandle
Description
Defines the Hungarian algorithm, which is a combinatorial optimization algorithm that solves assignment problems in polynomial time.
Structure Definition
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | struct HungarianHandle { int rows; int cols; int max; int* resX; int* resY; bool transpose; std::shared_ptr<int> adjMat; std::shared_ptr<int> xMatch; std::shared_ptr<int> yMatch; std::shared_ptr<int> xValue; std::shared_ptr<int> yValue; std::shared_ptr<int> slack; std::shared_ptr<int> xVisit; std::shared_ptr<int> yVisit; }; |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
rows |
Input |
Matrix rows for matching. |
cols |
Input |
Matrix columns for matching. |
max |
Output |
Maximum values of the matrix rows and columns for matching. |
resX |
Output |
Matching result of the vertex set x. |
resY |
Output |
Matching result of the vertex set y. |
transpose |
Output |
Matrix transpose ID. |
adjMat |
Input |
Weight matrix. |
xMatch |
Output |
Matching value of the vertex set x. |
yMatch |
Output |
Matching value of the vertex set y. |
xValue |
Output |
Labeling value of the vertex set x. |
yValue |
Output |
Value of the vertex set y. The default value is 0. |
slack |
Output |
Slack array. |
xVisit |
Output |
Matching ID of vertex set x. |
yVisit |
Output |
Matching ID of vertex set y. |