#include <OptimizedIndexSet.h>
Public Member Functions | |
OptimizedIndexSet (const std::set< T > &inputSet=std::set< T >()) | |
Constructor. More... | |
~OptimizedIndexSet ()=default | |
void | getPosition (const T &index, size_type &pos, bool &found) const |
bool | getPosition (const OptimizedIndexSet< T > &rhs) const |
bool | operator== (const OptimizedIndexSet< T > &rhs) const |
const std::vector< T > & | getContiguousRanges () const |
Private Attributes | |
size_type | d_numContiguousRanges |
Store the number of contiguous ranges in the input set of indices. More... | |
std::vector< T > | d_contiguousRanges |
std::vector< size_type > | d_numEntriesBefore |
dftefe::utils::OptimizedIndexSet< T >::OptimizedIndexSet | ( | const std::set< T > & | inputSet = std::set<T>() | ) |
Constructor.
[in] | inputSet | A set of unsigned int or unsigned long int for which an OptimizedIndexSet is to be created |
|
default |
const std::vector< T > & dftefe::utils::OptimizedIndexSet< T >::getContiguousRanges |
bool dftefe::utils::OptimizedIndexSet< T >::getPosition | ( | const OptimizedIndexSet< T > & | rhs | ) | const |
void dftefe::utils::OptimizedIndexSet< T >::getPosition | ( | const T & | index, |
size_type & | pos, | ||
bool & | found | ||
) | const |
bool dftefe::utils::OptimizedIndexSet< T >::operator== | ( | const OptimizedIndexSet< T > & | rhs | ) | const |
|
private |
|
private |
Store the number of contiguous ranges in the input set of indices.
|
private |
Vector of size d_numContiguousRanges which stores the accumulated number of elements in d_set prior to the i-th contiguous range