Ocean
|
This class manages a set of element correspondences. More...
Public Types | |
typedef T | Type |
Defines the data type of the individual elements. More... | |
typedef std::vector< T > | Elements |
This class defines a vector storing individual elements. More... | |
typedef std::vector< Elements > | ElementsVector |
This class defines a vector storing vectors of elements. More... | |
Public Member Functions | |
CorrespondenceSet () | |
Creates an empty object. More... | |
CorrespondenceSet (const Elements &elements) | |
Creates new object by adding the first elements. More... | |
CorrespondenceSet (Elements &&elements) | |
Creates new object by adding the first elements. More... | |
CorrespondenceSet (CorrespondenceSet< T > &&correspondenceSet) noexcept | |
Move constructor. More... | |
size_t | size () const |
Returns the number of correspondences. More... | |
size_t | elements () const |
Returns the number of corresponding elements. More... | |
const ElementsVector & | correspondences () const |
Returns the set of stored correspondences. More... | |
bool | setFirstElements (const Elements &elements) |
Changes (or sets) the first set of elements. More... | |
bool | setFirstElements (Elements &&elements) |
Changes (or sets) the first set of elements. More... | |
bool | setFirstElements (const Elements &elements, const Indices32 &validIndices) |
Changes (or sets) the first set of elements. More... | |
bool | setLastElements (const Elements &elements) |
Changes (or sets) the last set of elements. More... | |
bool | setLastElements (Elements &&elements) |
Changes (or sets) the last set of elements. More... | |
bool | setLastElements (const Elements &elements, const Indices32 &validIndices) |
Changes (or sets) the last set of elements. More... | |
bool | addElements (const Elements &elements) |
Adds a new set of elements that corresponds to the stored sets of elements. More... | |
bool | addElements (Elements &&elements) |
Adds a new set of elements that corresponds to the stored sets of elements. More... | |
bool | addElements (const Elements &elements, const Indices32 &validIndices) |
Adds a new subset of elements that corresponds to a subset of the stored sets of elements. More... | |
bool | reduce (const Indices32 &validIndices) |
Reduces the elements within each set of corresponding elements. More... | |
bool | isEmpty () const |
Returns whether this object does not hold any set of elements. More... | |
operator bool () const | |
Returns whether this object holds at least one set of elements. More... | |
CorrespondenceSet< T > & | operator= (CorrespondenceSet< T > &&right) noexcept |
Move operator. More... | |
Protected Member Functions | |
bool | isValid () const |
Returns whether this object stores sets of elements with same number of elements. More... | |
Protected Attributes | |
ElementsVector | correspondenceElementsSet |
The set of corresponding elements. More... | |
This class manages a set of element correspondences.
T | Data type of the individual elements for that the set of correspondences will be stored |
typedef std::vector<T> Ocean::Tracking::CorrespondenceSet< T >::Elements |
This class defines a vector storing individual elements.
typedef std::vector<Elements> Ocean::Tracking::CorrespondenceSet< T >::ElementsVector |
This class defines a vector storing vectors of elements.
typedef T Ocean::Tracking::CorrespondenceSet< T >::Type |
Defines the data type of the individual elements.
|
inline |
Creates an empty object.
|
inlineexplicit |
Creates new object by adding the first elements.
elements | First elements that will be stored as first reference elements |
|
inlineexplicit |
Creates new object by adding the first elements.
elements | First elements that will be stored as first reference elements |
|
inlinenoexcept |
Move constructor.
correspondenceSet | Correspondence object to be moved |
|
inline |
Adds a new set of elements that corresponds to the stored sets of elements.
Element correspondence is defined by the index of the given elements.
Beware: The number of provided elements must match to the number of stored elements in each set of this object.
elements | Elements to be added |
|
inline |
Adds a new subset of elements that corresponds to a subset of the stored sets of elements.
Element correspondence is defined by the index of the given elements.
This function takes a set of indices which define the valid subset of the given elements.
Only valid elements will be added while also the already stored sets of elements will be reduced so that only valid elements are stored finally.
elements | Elements to be added |
validIndices | Indices that define a valid subset of the given elements, each index must exist at most once and must lie inside the range [0, elements.size()) |
|
inline |
Adds a new set of elements that corresponds to the stored sets of elements.
Element correspondence is defined by the index of the given elements.
Beware: The number of provided elements must match to the number of stored elements in each set of this object.
elements | Elements to be added |
|
inline |
Returns the set of stored correspondences.
|
inline |
Returns the number of corresponding elements.
|
inline |
Returns whether this object does not hold any set of elements.
Beware: This state does not say anything about the number of elements that are stored in the individual sets.
To ensure that this object holds a valid number of sets and a valid number of elements check also elements().
|
inlineprotected |
Returns whether this object stores sets of elements with same number of elements.
|
inlineexplicit |
Returns whether this object holds at least one set of elements.
|
inlinenoexcept |
Move operator.
right | Second object to be moved |
|
inline |
Reduces the elements within each set of corresponding elements.
The remaining elements are defined by a set of indices.
validIndices | Indices that define a valid subset of the already stored elements, each index must exist at most once and must lie inside the range [0, elements()) |
|
inline |
Changes (or sets) the first set of elements.
Beware: The number of provided elements must match to the number of stored elements in each set of this object, if elements have been set already.
elements | Elements that replace the existing ones |
bool Ocean::Tracking::CorrespondenceSet< T >::setFirstElements | ( | const Elements & | elements, |
const Indices32 & | validIndices | ||
) |
Changes (or sets) the first set of elements.
This function takes a set of indices which define the valid subset of the given elements.
Only valid elements will be added while also the already stored sets of elements will be reduced so that only valid elements are stored finally.
elements | Elements that replace the existing ones |
validIndices | Indices that define a valid subset of the given elements, each index must exist at most once and must lie inside the range [0, elements.size()) |
|
inline |
Changes (or sets) the first set of elements.
Beware: The number of provided elements must match to the number of stored elements in each set of this object, if elements have been set already.
elements | Elements that replace the existing ones |
|
inline |
Changes (or sets) the last set of elements.
Beware: The number of provided elements must match to the number of stored elements in each set of this object, if elements have been set already.
elements | Elements that replace the existing ones |
bool Ocean::Tracking::CorrespondenceSet< T >::setLastElements | ( | const Elements & | elements, |
const Indices32 & | validIndices | ||
) |
Changes (or sets) the last set of elements.
This function takes a set of indices which define the valid subset of the given elements.
Only valid elements will be added while also the already stored sets of elements will be reduced so that only valid elements are stored finally.
elements | Elements that replace the existing ones |
validIndices | Indices that define a valid subset of the given elements, each index must exist at most once and must lie inside the range [0, elements.size()) |
|
inline |
Changes (or sets) the last set of elements.
Beware: The number of provided elements must match to the number of stored elements in each set of this object, if elements have been set already.
elements | Elements that replace the existing ones |
|
inline |
Returns the number of correspondences.
|
protected |
The set of corresponding elements.