OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::IndexListContainer Class Reference

#include <LocalIndexManager.hpp>

Public Types

typedef std::list< std::pair< int, int > >::iterator IndexListContainerIterator
 

Public Member Functions

 IndexListContainer (int minIndex=0, int maxIndex=MAX_INTEGER)
 
int pop ()
 
void insert (int index)
 
void insert (int beginIndex, int endIndex)
 
void insert (std::vector< int > &indices)
 
std::vector< int > getIndicesBefore (int index)
 
int getMaxIndex ()
 

Static Public Attributes

static const int MAX_INTEGER = 2147483647
 

Private Member Functions

IndexListContainerIterator internalInsert (int beginIndex, int endIndex)
 
void merge (IndexListContainerIterator i)
 

Private Attributes

int minIndex_
 
int maxIndex_
 
std::list< std::pair< int, int > > indexContainer_
 

Detailed Description

Todo:
documentation

Definition at line 65 of file LocalIndexManager.hpp.

Member Typedef Documentation

◆ IndexListContainerIterator

typedef std::list<std::pair<int, int> >::iterator OpenMD::IndexListContainer::IndexListContainerIterator

Definition at line 68 of file LocalIndexManager.hpp.

Constructor & Destructor Documentation

◆ IndexListContainer()

OpenMD::IndexListContainer::IndexListContainer ( int  minIndex = 0,
int  maxIndex = MAX_INTEGER 
)
inline

Definition at line 70 of file LocalIndexManager.hpp.

References indexContainer_.

Member Function Documentation

◆ getIndicesBefore()

std::vector<int> OpenMD::IndexListContainer::getIndicesBefore ( int  index)
inline

Definition at line 142 of file LocalIndexManager.hpp.

References indexContainer_.

◆ getMaxIndex()

int OpenMD::IndexListContainer::getMaxIndex ( )
inline

Definition at line 174 of file LocalIndexManager.hpp.

References maxIndex_.

◆ insert() [1/3]

void OpenMD::IndexListContainer::insert ( int  index)
inline

Definition at line 100 of file LocalIndexManager.hpp.

References internalInsert(), and merge().

Referenced by insert().

◆ insert() [2/3]

void OpenMD::IndexListContainer::insert ( int  beginIndex,
int  endIndex 
)
inline

Reclaims an index range

Parameters
beginIndex
endIndex

Definition at line 110 of file LocalIndexManager.hpp.

References internalInsert(), and merge().

◆ insert() [3/3]

void OpenMD::IndexListContainer::insert ( std::vector< int > &  indices)
inline

Reclaims an index array.

Parameters
indices

Definition at line 120 of file LocalIndexManager.hpp.

References insert().

◆ internalInsert()

IndexListContainerIterator OpenMD::IndexListContainer::internalInsert ( int  beginIndex,
int  endIndex 
)
inlineprivate

Definition at line 180 of file LocalIndexManager.hpp.

References indexContainer_, and maxIndex_.

Referenced by insert().

◆ merge()

void OpenMD::IndexListContainer::merge ( IndexListContainerIterator  i)
inlineprivate

Definition at line 208 of file LocalIndexManager.hpp.

References indexContainer_.

Referenced by insert().

◆ pop()

int OpenMD::IndexListContainer::pop ( )
inline

Definition at line 75 of file LocalIndexManager.hpp.

References indexContainer_.

Member Data Documentation

◆ indexContainer_

std::list<std::pair<int, int> > OpenMD::IndexListContainer::indexContainer_
private

◆ MAX_INTEGER

const int OpenMD::IndexListContainer::MAX_INTEGER = 2147483647
static

Definition at line 67 of file LocalIndexManager.hpp.

◆ maxIndex_

int OpenMD::IndexListContainer::maxIndex_
private

Definition at line 234 of file LocalIndexManager.hpp.

Referenced by getMaxIndex(), and internalInsert().

◆ minIndex_

int OpenMD::IndexListContainer::minIndex_
private

Definition at line 233 of file LocalIndexManager.hpp.


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