![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Implementation of munkres algorithm. More...
#include <Munkres.h>
Public Member Functions | |
| bool | isInit () const |
| check for object initialization | |
| void | init (const ipUInt32 nbRows, const ipUInt32 nbColumns) |
| initialization of munkres algorithm More... | |
| ipUInt32 | getNbRows () const |
| retrieve number of rows for matrix associated to algorithm More... | |
| ipUInt32 | getNbColumns () const |
| retrieve number of columns for matrix associated to algorithm More... | |
| ipReal64 * | getWeights (const ipUInt32 rowIdx) |
| method allowing to write matrix row weights associated to a given row index More... | |
| const ipReal64 * | getWeights (const ipUInt32 rowIdx) const |
| retrieve matrix row weights associated to a given row index More... | |
| ipReal64 | getWeight (const ipUInt32 rowIdx, const ipUInt32 columnIdx) const |
| retrieve weight associated to a given row and column index More... | |
| bool | isSolved () const |
| check whether hungarian problem has been solved More... | |
| void | solve () |
| resolution of hungarian problem More... | |
| const UInt32Vector & | getAssignments () const |
| retrieve assignments made by hungarian method More... | |
| ipReal64 | getTotalWeigth () |
| retrieve total weight for assignment solution More... | |
| void | clear () |
| method allowing to clear object data | |
Constructors and destructor | |
| Munkres () | |
| ~Munkres () | |
Protected Attributes | |
| ipUInt32 | _nbRows |
| number of rows for matrix associated to algorithm | |
| ipUInt32 | _nbColumns |
| number of columns for matrix associated to algorithm | |
| Real64Vector | _inputWeights |
| input matrix data associated to algorithm | |
| UInt32Vector | _assignments |
| assignment vector associated to problem solution | |
Implementation of munkres algorithm.
This algorithm, also known has Hungarian method or Kuhn-Munkres algorithm, allows to solve a weighted bipartite graph assignment problem.
After algorithm initialization, user should fill rows of matrix data. Once all data filled, user can trigger processing
initialization of munkres algorithm
| ipsdk::math::IPSDKMathException | if nbColumns == 0 |
| ipsdk::math::IPSDKMathException | if nbRows > nbColumns |
| ipUInt32 ipsdk::math::Munkres::getNbRows | ( | ) | const |
retrieve number of rows for matrix associated to algorithm
| ipsdk::math::IPSDKMathException | if isInit() == false |
| ipUInt32 ipsdk::math::Munkres::getNbColumns | ( | ) | const |
retrieve number of columns for matrix associated to algorithm
| ipsdk::math::IPSDKMathException | if isInit() == false |
method allowing to write matrix row weights associated to a given row index
| ipsdk::math::IPSDKMathException | if rowIdx >= getNbRows() |
retrieve matrix row weights associated to a given row index
| ipsdk::math::IPSDKMathException | if rowIdx >= getNbRows() |
retrieve weight associated to a given row and column index
| ipsdk::math::IPSDKMathException | if rowIdx >= getNbRows() |
| ipsdk::math::IPSDKMathException | if columnIdx >= getNbColumns() |
| bool ipsdk::math::Munkres::isSolved | ( | ) | const |
check whether hungarian problem has been solved
| ipsdk::math::IPSDKMathException | if isInit() == false |
| void ipsdk::math::Munkres::solve | ( | ) |
resolution of hungarian problem
| ipsdk::math::IPSDKMathException | if isInit() == false |
| const UInt32Vector& ipsdk::math::Munkres::getAssignments | ( | ) | const |
retrieve assignments made by hungarian method
| ipsdk::math::IPSDKMathException | if isSolved() == false |
| ipReal64 ipsdk::math::Munkres::getTotalWeigth | ( | ) |
retrieve total weight for assignment solution
| ipsdk::math::IPSDKMathException | if isSolved() == false |
1.8.14