DFT-EFE
 
Loading...
Searching...
No Matches
dftefe::utils::OptimizedIndexSet< T > Class Template Reference

#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_typed_numEntriesBefore
 

Constructor & Destructor Documentation

◆ OptimizedIndexSet()

template<typename T >
dftefe::utils::OptimizedIndexSet< T >::OptimizedIndexSet ( const std::set< T > &  inputSet = std::set<T>())

Constructor.

Parameters
[in]inputSetA set of unsigned int or unsigned long int for which an OptimizedIndexSet is to be created

◆ ~OptimizedIndexSet()

template<typename T >
dftefe::utils::OptimizedIndexSet< T >::~OptimizedIndexSet ( )
default

Member Function Documentation

◆ getContiguousRanges()

template<typename T >
const std::vector< T > & dftefe::utils::OptimizedIndexSet< T >::getContiguousRanges

◆ getPosition() [1/2]

template<typename T >
bool dftefe::utils::OptimizedIndexSet< T >::getPosition ( const OptimizedIndexSet< T > &  rhs) const

◆ getPosition() [2/2]

template<typename T >
void dftefe::utils::OptimizedIndexSet< T >::getPosition ( const T &  index,
size_type pos,
bool &  found 
) const

◆ operator==()

template<typename T >
bool dftefe::utils::OptimizedIndexSet< T >::operator== ( const OptimizedIndexSet< T > &  rhs) const

Member Data Documentation

◆ d_contiguousRanges

template<typename T >
std::vector<T> dftefe::utils::OptimizedIndexSet< T >::d_contiguousRanges
private

◆ d_numContiguousRanges

template<typename T >
size_type dftefe::utils::OptimizedIndexSet< T >::d_numContiguousRanges
private

Store the number of contiguous ranges in the input set of indices.

◆ d_numEntriesBefore

template<typename T >
std::vector<size_type> dftefe::utils::OptimizedIndexSet< T >::d_numEntriesBefore
private

Vector of size d_numContiguousRanges which stores the accumulated number of elements in d_set prior to the i-th contiguous range


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