IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BipartitePartialMatch.h
1 // BipartitePartialMatch.h:
3 // ------------------------
4 //
23 
24 #ifndef __IPSDKMATH_BIPARTITEPARTIALMATCH_H__
25 #define __IPSDKMATH_BIPARTITEPARTIALMATCH_H__
26 
27 // suppression warnings
28 // warning C4251: 'ipsdk::math::BipartitePartialMatch::_inputWeights' : class 'std::vector<ipsdk::ipReal64,std::allocator<_Ty>>' needs to have dll-interface to be used by clients of class 'ipsdk::math::BipartitePartialMatch'
29 #pragma warning (push)
30 #pragma warning (disable : 4251)
31 
34 
35 namespace ipsdk {
36 namespace math {
37 
40 
42 {
43 public:
49 
50 // methods
51 public:
53  static ipUInt32 getUnAssignedValue();
54 
56  bool isInit() const;
57 
59  void init(const ipUInt32 nbRows,
60  const ipUInt32 nbColumns,
61  const ipReal64 threshold);
62 
66  ipUInt32 getNbRows() const;
67 
71  ipUInt32 getNbColumns() const;
72 
76  ipReal64 getThreshold() const;
77 
82  ipReal64* getWeights(const ipUInt32 rowIdx);
83 
87  const ipReal64* getWeights(const ipUInt32 rowIdx) const;
88 
94  ipReal64 getWeight(const ipUInt32 rowIdx,
95  const ipUInt32 columnIdx) const;
96 
100  bool isSolved() const;
101 
105  void solve();
106 
114  const UInt32Vector& getRowAssignments() const;
115 
123  const UInt32Vector& getColumnAssignments() const;
124 
126  void clear();
127 
128 // attributes
129 protected:
132 
135 
138 
141 
144 
147 };
148 
151 
152 inline bool
154 {
155  return _inputWeights.empty() == false;
156 }
157 
160 
161 } // end of namespace math
162 } // end of namespace ipsdk
163 
164 #pragma warning (pop)
165 
166 #endif // __IPSDKMATH_BIPARTITEPARTIALMATCH_H__
Definition of import/export macro for library.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
ipUInt32 _nbColumns
number of columns for matrix associated to algorithm
Definition: BipartitePartialMatch.h:134
std::vector< ipUInt32 > UInt32Vector
stl vector collections
Definition: BaseCollections.h:33
std::vector< ipReal64 > Real64Vector
stl vector collections
Definition: BaseCollections.h:37
bool isInit() const
check for object initialization
Definition: BipartitePartialMatch.h:153
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
Algorithm allowing to solve a partial graph bipartite assigment problem.
Definition: BipartitePartialMatch.h:41
ipReal64 _threshold
assignment threshold for algorithm
Definition: BipartitePartialMatch.h:137
#define IPSDKMATH_API
Import/Export macro for library IPSDKMath.
Definition: IPSDKMathExports.h:27
Real64Vector _inputWeights
input matrix data associated to algorithm
Definition: BipartitePartialMatch.h:140
UInt32Vector _columnAssignments
column assignments vector associated to problem solution
Definition: BipartitePartialMatch.h:146
Predefined base collection types for library.
UInt32Vector _rowAssignments
row assignments vector associated to problem solution
Definition: BipartitePartialMatch.h:143
ipUInt32 _nbRows
number of rows for matrix associated to algorithm
Definition: BipartitePartialMatch.h:131
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53