IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ipsdk::math::clustering::KernelKMeansCentroid< KernelType > Class Template Reference

Public Member Functions

ipUInt64 getNbSamples () const
 retrieve number of added samples associated to centroid
 
ipUInt32 getDictionarySize () const
 retrieve dictionary size associated to centroid
 
void addSample (const Vector &sample)
 agregate sample to centroid More...
 
IPSDK_FORCEINLINE ipReal64 comparable_distance (const Vector &sample) const
 compute comparable distance from a sample to cluster centroid More...
 
IPSDK_FORCEINLINE ipReal64 distance (const Vector &sample) const
 compute distance from a sample to cluster centroid More...
 
ipReal64 getClusterTerm () const
 retrieve cluster term associated to centroid
 
const VectorCollgetDictionary () const
 retrieve dictionary associated to centroid
 
const Real64VectorgetWeights () const
 retrieve weight factors associated to centroid
 
void clear ()
 method allowing to clear centroid data
 
Constructors and destructor
 KernelKMeansCentroid (const KernelType &kernel)
 
 ~KernelKMeansCentroid ()
 

Protected Member Functions

void updateClusterTerm () const
 
void updateMinStrength ()
 

Protected Attributes

KernelType _kernel
 kernel associated to cluster dictionary
 
ipReal64 _accuracyThreshold
 accuracy threshold value for approximate linear dependence condition
 
ipUInt32 _maxDictionarySize
 maximum dictionary size for processing
 
VectorColl _dictionary
 
Real64Vector _weights
 weight factors for each elements of dictionary
 
ipUInt64 _nbSamples
 number of added samples
 
std::pair< ipReal64, bool > _clusterTermInfo
 
Matrix _matK
 K Matrix used to store approximate linear dependance system condition.
 
Matrix _invMatK
 Inverse of K Matrix.
 
std::pair< ipReal64, ipUInt32_minStrengthInfo
 
Matrix _wkMat
 working array
 
Vector _wkVec
 working array
 
Vector _wkVecA
 working array
 
Vector _wkVecMixedTerms
 working array
 

Algorithm parameters

const KernelType & getKernel () const
 retrieve kernel associated to centroid
 
void setAccuracyThreshold (const ipReal64 accuracyThreshold)
 set accuracy threshold for approximate linear dependence condition More...
 
ipReal64 getAccuracyThreshold () const
 retrieve accuracy threshold for approximate linear dependence condition
 
void setMaxDictionarySize (const ipUInt32 maxDictionarySize)
 set maximum dictionary size for processing More...
 
ipUInt32 getMaxDictionarySize () const
 retrieve maximum dictionary size for processing
 
static ipReal64 getDefaultAccuracyThreshold ()
 retrieve default accuracy threshold value
 
static ipUInt32 getDefaultMaxDictionarySize ()
 retrieve default maximum dictionary size for processing
 

Member Function Documentation

◆ setAccuracyThreshold()

template<typename KernelType >
void ipsdk::math::clustering::KernelKMeansCentroid< KernelType >::setAccuracyThreshold ( const ipReal64  accuracyThreshold)

set accuracy threshold for approximate linear dependence condition

Exceptions
ipsdk::math::IPSDKMathExceptionif accuracyThreshold < 0

◆ setMaxDictionarySize()

template<typename KernelType >
void ipsdk::math::clustering::KernelKMeansCentroid< KernelType >::setMaxDictionarySize ( const ipUInt32  maxDictionarySize)

set maximum dictionary size for processing

Exceptions
ipsdk::math::IPSDKMathExceptionif maxDictionarySize == 0

◆ addSample()

template<typename KernelType >
void ipsdk::math::clustering::KernelKMeansCentroid< KernelType >::addSample ( const Vector sample)

agregate sample to centroid

Warning
there is no check on vectors size consistency

◆ comparable_distance()

template<typename KernelType >
IPSDK_FORCEINLINE ipReal64 ipsdk::math::clustering::KernelKMeansCentroid< KernelType >::comparable_distance ( const Vector sample) const
inline

compute comparable distance from a sample to cluster centroid

Warning
there is no check on vectors size consistency

◆ distance()

template<typename KernelType >
IPSDK_FORCEINLINE ipReal64 ipsdk::math::clustering::KernelKMeansCentroid< KernelType >::distance ( const Vector sample) const
inline

compute distance from a sample to cluster centroid

Warning
there is no check on vectors size consistency

◆ updateClusterTerm()

template<typename KernelType >
void ipsdk::math::clustering::KernelKMeansCentroid< KernelType >::updateClusterTerm ( ) const
protected

method allowing to update cluster term used in scalar product decomposition

◆ updateMinStrength()

template<typename KernelType >
void ipsdk::math::clustering::KernelKMeansCentroid< KernelType >::updateMinStrength ( )
protected

method allowing to update sample point into dictionary with minimum "strength"

Member Data Documentation

◆ _dictionary

template<typename KernelType >
VectorColl ipsdk::math::clustering::KernelKMeansCentroid< KernelType >::_dictionary
protected

dictionary associated to centroid (collection of sample points)

◆ _clusterTermInfo

template<typename KernelType >
std::pair<ipReal64, bool> ipsdk::math::clustering::KernelKMeansCentroid< KernelType >::_clusterTermInfo
mutableprotected

cluster term used in scalar product decomposition and flag indicating whether term is up to date

◆ _minStrengthInfo

template<typename KernelType >
std::pair<ipReal64, ipUInt32> ipsdk::math::clustering::KernelKMeansCentroid< KernelType >::_minStrengthInfo
protected

sample point into dictionary with minimum "strength" (used only in case where dictionary size reach maximum allowed)


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