DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
dftfe::utils::OptimizedIndexSet< T > Class Template Reference

#include <OptimizedIndexSet.h>

Public Member Functions

 OptimizedIndexSet (const std::set< T > &inputSet=std::set< T >())
 Constructor.
 
 ~OptimizedIndexSet ()=default
 
void getPosition (const T &index, size_type &pos, bool &found) const
 
bool getPosition (const OptimizedIndexSet< T > &rhs) const
 

Private Member Functions

bool operator== (const OptimizedIndexSet< T > &rhs) const
 

Private Attributes

size_type d_numContiguousRanges
 Store the number of contiguous ranges in the input set of indices.
 
std::vector< T > d_contiguousRanges
 
std::vector< size_typed_numEntriesBefore
 

Constructor & Destructor Documentation

◆ OptimizedIndexSet()

template<typename T>
dftfe::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>
dftfe::utils::OptimizedIndexSet< T >::~OptimizedIndexSet ( )
default

Member Function Documentation

◆ getPosition() [1/2]

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

◆ getPosition() [2/2]

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

◆ operator==()

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

Member Data Documentation

◆ d_contiguousRanges

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

◆ d_numContiguousRanges

template<typename T>
size_type dftfe::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> dftfe::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: