|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Result of the Hungarian assignment algorithm. More...
#include <Hungarian.H>
Public Member Functions | |
| DynList< std::pair< size_t, size_t > > | get_pairs () const |
| Get the assignment pairs, excluding dummy entries. | |
Public Attributes | |
| Cost_Type | total_cost = Cost_Type{0} |
| Optimal total cost. | |
| Array< long > | row_to_col |
| row i is assigned to column row_to_col[i] | |
| Array< long > | col_to_row |
| column j is assigned to row col_to_row[j] | |
| size_t | orig_rows = 0 |
| Original number of rows. | |
| size_t | orig_cols = 0 |
| Original number of columns. | |
Result of the Hungarian assignment algorithm.
Holds the optimal cost and the row-to-column / column-to-row mappings. For rectangular matrices, dummy assignments (to padded rows or columns) are marked with -1.
| Cost_Type | Numeric type for costs (default: double). |
Definition at line 114 of file Hungarian.H.
|
inline |
Get the assignment pairs, excluding dummy entries.
Returns only the pairs (row, col) where both row and col are within the original (non-padded) dimensions.
Definition at line 133 of file Hungarian.H.
References Aleph::and, Aleph::DynList< T >::append(), Aleph::Hungarian_Result< Cost_Type >::orig_cols, Aleph::Hungarian_Result< Cost_Type >::orig_rows, and Aleph::Hungarian_Result< Cost_Type >::row_to_col.
column j is assigned to row col_to_row[j]
Definition at line 122 of file Hungarian.H.
Referenced by Aleph::hungarian_assignment(), and Aleph::hungarian_max_assignment().
| size_t Aleph::Hungarian_Result< Cost_Type >::orig_cols = 0 |
Original number of columns.
Definition at line 124 of file Hungarian.H.
Referenced by Aleph::Hungarian_Result< Cost_Type >::get_pairs(), Aleph::hungarian_assignment(), and Aleph::hungarian_max_assignment().
| size_t Aleph::Hungarian_Result< Cost_Type >::orig_rows = 0 |
Original number of rows.
Definition at line 123 of file Hungarian.H.
Referenced by Aleph::Hungarian_Result< Cost_Type >::get_pairs(), Aleph::hungarian_assignment(), and Aleph::hungarian_max_assignment().
row i is assigned to column row_to_col[i]
Definition at line 121 of file Hungarian.H.
Referenced by Aleph::Hungarian_Result< Cost_Type >::get_pairs(), Aleph::hungarian_assignment(), and Aleph::hungarian_max_assignment().
| Cost_Type Aleph::Hungarian_Result< Cost_Type >::total_cost = Cost_Type{0} |
Optimal total cost.
Definition at line 120 of file Hungarian.H.
Referenced by Aleph::hungarian_assignment(), and Aleph::hungarian_max_assignment().