Ocean
Ocean::Tracking::VocabularyStructure::Match< TDistance > Class Template Reference

This class implements a simple container holding the index pairs of matching descriptors and their distance. More...

Public Member Functions

 Match ()=default
 Default constructor for an invalid match. More...
 
 Match (const Index32 candidateDescriptorIndex, const Index32 queryDescriptorIndex, const TDistance distance)
 Creates a new match object. More...
 
Index32 candidateDescriptorIndex () const
 Returns the index of the candidate descriptor. More...
 
Index32 queryDescriptorIndex () const
 Returns the index of the query descriptor. More...
 
TDistance distance () const
 Returns the distance between both descriptors. More...
 
bool isValid () const
 Returns whether this match is valid. More...
 

Protected Attributes

Index32 candidateDescriptorIndex_ = invalidMatchIndex()
 The index of the candidate descriptor, with range [0, infinity). More...
 
Index32 queryDescriptorIndex_ = invalidMatchIndex()
 The index of the query descriptor, with range [0, infinity). More...
 
TDistance distance_ = NumericT<TDistance>::maxValue()
 The distance between both descriptors, with range [0, infinity]. More...
 

Detailed Description

template<typename TDistance>
class Ocean::Tracking::VocabularyStructure::Match< TDistance >

This class implements a simple container holding the index pairs of matching descriptors and their distance.

Template Parameters
TDistanceThe data type of the distance measure between two descriptors, e.g., 'unsigned int', 'float'

Constructor & Destructor Documentation

◆ Match() [1/2]

template<typename TDistance >
Ocean::Tracking::VocabularyStructure::Match< TDistance >::Match ( )
default

Default constructor for an invalid match.

◆ Match() [2/2]

template<typename TDistance >
Ocean::Tracking::VocabularyStructure::Match< TDistance >::Match ( const Index32  candidateDescriptorIndex,
const Index32  queryDescriptorIndex,
const TDistance  distance 
)
inline

Creates a new match object.

Parameters
candidateDescriptorIndexThe index of the candidate descriptor, with range [0, infinity)
queryDescriptorIndexThe index of the query descriptor, with range [0, infinity)
distanceThe distance between both descriptors, with range [0, infinity]

Member Function Documentation

◆ candidateDescriptorIndex()

template<typename TDistance >
Index32 Ocean::Tracking::VocabularyStructure::Match< TDistance >::candidateDescriptorIndex ( ) const
inline

Returns the index of the candidate descriptor.

Returns
The candidate descriptor's index, with range [0, infinity)

◆ distance()

template<typename TDistance >
TDistance Ocean::Tracking::VocabularyStructure::Match< TDistance >::distance ( ) const
inline

Returns the distance between both descriptors.

Returns
The distance, with range [0, infinity]

◆ isValid()

template<typename TDistance >
bool Ocean::Tracking::VocabularyStructure::Match< TDistance >::isValid ( ) const
inline

Returns whether this match is valid.

Returns
True, if so

◆ queryDescriptorIndex()

template<typename TDistance >
Index32 Ocean::Tracking::VocabularyStructure::Match< TDistance >::queryDescriptorIndex ( ) const
inline

Returns the index of the query descriptor.

Returns
The query descriptor's index, with range [0, infinity)

Field Documentation

◆ candidateDescriptorIndex_

template<typename TDistance >
Index32 Ocean::Tracking::VocabularyStructure::Match< TDistance >::candidateDescriptorIndex_ = invalidMatchIndex()
protected

The index of the candidate descriptor, with range [0, infinity).

◆ distance_

template<typename TDistance >
TDistance Ocean::Tracking::VocabularyStructure::Match< TDistance >::distance_ = NumericT<TDistance>::maxValue()
protected

The distance between both descriptors, with range [0, infinity].

◆ queryDescriptorIndex_

template<typename TDistance >
Index32 Ocean::Tracking::VocabularyStructure::Match< TDistance >::queryDescriptorIndex_ = invalidMatchIndex()
protected

The index of the query descriptor, with range [0, infinity).


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