IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ipsdk::math::BipartitePartialMatch Class Reference

Algorithm allowing to solve a partial graph bipartite assigment problem. More...

#include <BipartitePartialMatch.h>

Public Member Functions

bool isInit () const
 check for object initialization
 
void init (const ipUInt32 nbRows, const ipUInt32 nbColumns, const ipReal64 threshold)
 initialization of algorithm
 
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 getThreshold () const
 retrieve assignment threshold associated to algorithm More...
 
ipReal64getWeights (const ipUInt32 rowIdx)
 method allowing to write matrix row weights associated to a given row index More...
 
const ipReal64getWeights (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 UInt32VectorgetRowAssignments () const
 retrieve assignments made by algorithm More...
 
const UInt32VectorgetColumnAssignments () const
 retrieve assignments made by algorithm More...
 
void clear ()
 method allowing to clear object data
 
Constructors and destructor
 BipartitePartialMatch ()
 
 ~BipartitePartialMatch ()
 

Static Public Member Functions

static ipUInt32 getUnAssignedValue ()
 retrieve value used for un matched data (un assigned indexes)
 

Protected Attributes

ipUInt32 _nbRows
 number of rows for matrix associated to algorithm
 
ipUInt32 _nbColumns
 number of columns for matrix associated to algorithm
 
ipReal64 _threshold
 assignment threshold for algorithm
 
Real64Vector _inputWeights
 input matrix data associated to algorithm
 
UInt32Vector _rowAssignments
 row assignments vector associated to problem solution
 
UInt32Vector _columnAssignments
 column assignments vector associated to problem solution
 

Detailed Description

Algorithm allowing to solve a partial graph bipartite assigment problem.

Author
E.Noirfalise
Date
2016/10/20

Given two set of data index $fi N $ and \$fj \in M$ linked by weights $w(i, j) \in \Re$ :

Member Function Documentation

◆ getNbRows()

ipUInt32 ipsdk::math::BipartitePartialMatch::getNbRows ( ) const

retrieve number of rows for matrix associated to algorithm

Exceptions
ipsdk::math::IPSDKMathExceptionif isInit() == false

◆ getNbColumns()

ipUInt32 ipsdk::math::BipartitePartialMatch::getNbColumns ( ) const

retrieve number of columns for matrix associated to algorithm

Exceptions
ipsdk::math::IPSDKMathExceptionif isInit() == false

◆ getThreshold()

ipReal64 ipsdk::math::BipartitePartialMatch::getThreshold ( ) const

retrieve assignment threshold associated to algorithm

Exceptions
ipsdk::math::IPSDKMathExceptionif isInit() == false

◆ getWeights() [1/2]

ipReal64* ipsdk::math::BipartitePartialMatch::getWeights ( const ipUInt32  rowIdx)

method allowing to write matrix row weights associated to a given row index

Exceptions
ipsdk::math::IPSDKMathExceptionif rowIdx >= getNbRows()

◆ getWeights() [2/2]

const ipReal64* ipsdk::math::BipartitePartialMatch::getWeights ( const ipUInt32  rowIdx) const

retrieve matrix row weights associated to a given row index

Exceptions
ipsdk::math::IPSDKMathExceptionif rowIdx >= getNbRows()

◆ getWeight()

ipReal64 ipsdk::math::BipartitePartialMatch::getWeight ( const ipUInt32  rowIdx,
const ipUInt32  columnIdx 
) const

retrieve weight associated to a given row and column index

Exceptions
ipsdk::math::IPSDKMathExceptionif rowIdx >= getNbRows()
ipsdk::math::IPSDKMathExceptionif columnIdx >= getNbColumns()

◆ isSolved()

bool ipsdk::math::BipartitePartialMatch::isSolved ( ) const

check whether hungarian problem has been solved

Exceptions
ipsdk::math::IPSDKMathExceptionif isInit() == false

◆ solve()

void ipsdk::math::BipartitePartialMatch::solve ( )

resolution of hungarian problem

Exceptions
ipsdk::math::IPSDKMathExceptionif isInit() == false

◆ getRowAssignments()

const UInt32Vector& ipsdk::math::BipartitePartialMatch::getRowAssignments ( ) const

retrieve assignments made by algorithm

Returns
On output getRowAssignments()[i] = j means that row i is associated to column j
Note
values equal to getUnAssignedValue() stands for uninitialized values
Exceptions
ipsdk::math::IPSDKMathExceptionif isSolved() == false

◆ getColumnAssignments()

const UInt32Vector& ipsdk::math::BipartitePartialMatch::getColumnAssignments ( ) const

retrieve assignments made by algorithm

Returns
On output getColumnAssignments()[j] = i means that column j is associated to row i
Note
values equal to getUnAssignedValue() stands for uninitialized values
Exceptions
ipsdk::math::IPSDKMathExceptionif isSolved() == false

The documentation for this class was generated from the following file: