|
template<typename T > |
static std::vector< T > | subset (const std::vector< T > &objects, const std::vector< TIndex > &indices) |
| Extracts a subset of a given set of objects by usage of an index vector holding the indices of all objects to be used. More...
|
|
template<typename T > |
static std::vector< T > | subset (const std::vector< T > &objects, const std::set< TIndex > &indices) |
| Extracts a subset of a given set of objects by usage of a set of indices of all objects to be used. More...
|
|
template<typename T > |
static std::vector< T > | invertedSubset (const std::vector< T > &objects, const std::unordered_set< TIndex > &indices) |
| Extracts a subset of a given set of objects by usage of a set of indices of all objects to be not used. More...
|
|
template<typename T > |
static std::vector< T > | invertedSubset (const std::vector< T > &objects, const std::set< TIndex > &indices) |
| Extracts a subset of a given set of objects by usage of a set of indices of all objects to be not used. More...
|
|
template<typename T > |
static std::vector< T > | subset (const T *objects, const size_t numberObjects, const TIndex *indices, const size_t numberIndices) |
| Extracts a subset of a given set of objects by usage of a set of indices of all objects to be used. More...
|
|
template<typename T > |
static std::vector< T > | subset (const T *objects, const size_t numberObjects, const std::vector< TIndex > &indices) |
| Extracts a subset of a given set of objects by usage of a set of indices of all objects to be used. More...
|
|
template<typename T > |
static std::vector< T > | subset (const T *objects, const size_t numberObjects, const std::set< TIndex > &indices) |
| Extracts a subset of a given set of objects by usage of a set of indices of all objects to be used. More...
|
|
template<typename T > |
static std::vector< T > | invertedSubset (const T *objects, const size_t numberObjects, const std::unordered_set< TIndex > &indices) |
| Extracts a subset of a given set of objects by usage of a set of indices of all objects to be not used. More...
|
|
template<typename T > |
static std::vector< T > | invertedSubset (const T *objects, const size_t numberObjects, const std::set< TIndex > &indices) |
| Extracts a subset of a given set of objects by usage of a set of indices of all objects to be not used. More...
|
|
template<typename TContainer , uint8_t tValue> |
static std::vector< uint8_t > | indices2statements (const TContainer &indices, const size_t numberObjects) |
| Converts object indices to an uint8_t vector holding statements for each object. More...
|
|
template<uint8_t tValue> |
static std::vector< uint8_t > | indices2statements (const TIndex *indices, const size_t numberIndices, const size_t numberObjects) |
| Converts object indices to an uint8_t vector holding statements for each object. More...
|
|
template<uint8_t tValue> |
static std::vector< TIndex > | statements2indices (const std::vector< uint8_t > &statements) |
| Converts an uint8_t vector holding statements for each object into object indices. More...
|
|
template<uint8_t tValue> |
static std::vector< TIndex > | statements2indices (const uint8_t *statements, const size_t numberStatements) |
| Converts an uint8_t vector holding statements for each object into object indices. More...
|
|
template<typename TIndex>
class Ocean::Subset::InternalSubset< TIndex >
This helper class implements a subset functions.
- Template Parameters
-
TIndex | Data type of the index elements |
template<typename TIndex >
template<typename T >
Extracts a subset of a given set of objects by usage of an index vector holding the indices of all objects to be used.
If the index data type is an uint8_t, than the (boolean != 0u) statement is used to use the corresponding object or not.
Beware: No range check is done! Thus, each index must not exceed the number of given objects.
- Parameters
-
objects | Entire set of objects from that a subset will be extracted |
indices | Indices defining the subset to be extracted |
- Returns
- Resulting subset of the given objects
- Template Parameters
-
T | Data type of the objects |
template<typename TIndex >
template<typename T >
std::vector< T > Ocean::Subset::InternalSubset< TIndex >::subset |
( |
const T * |
objects, |
|
|
const size_t |
numberObjects, |
|
|
const std::vector< TIndex > & |
indices |
|
) |
| |
|
inlinestatic |
Extracts a subset of a given set of objects by usage of a set of indices of all objects to be used.
If the index data type is an uint8_t, than the (boolean != 0u) statement is used to use the corresponding object or not.
Beware: No range check is done! Thus, each index must not exceed the number of given objects.
- Parameters
-
objects | Entire set of objects from that a subset will be extracted |
numberObjects | Number of given objects |
indices | Indices defining the subset to be extracted |
- Returns
- Resulting subset of the given objects
- Template Parameters
-
T | Data type of the objects |
template<typename TIndex >
template<typename T >
std::vector< T > Ocean::Subset::InternalSubset< TIndex >::subset |
( |
const T * |
objects, |
|
|
const size_t |
numberObjects, |
|
|
const TIndex * |
indices, |
|
|
const size_t |
numberIndices |
|
) |
| |
|
inlinestatic |
Extracts a subset of a given set of objects by usage of a set of indices of all objects to be used.
If the index data type is an uint8_t, than the (boolean != 0u) statement is used to use the corresponding object or not.
Beware: No range check is done! Thus, each index must not exceed the number of given objects.
- Parameters
-
objects | Entire set of objects from that a subset will be extracted |
numberObjects | Number of given objects |
indices | Indices defining the subset to be extracted |
numberIndices | Number of given indices |
- Returns
- Resulting subset of the given objects
- Template Parameters
-
T | Data type of the objects |