Public Member Functions
CCircularIndex Class Reference

A class to adress a circulat bufer of a fixed size. More...

#include <mia/core/index.hh>

Public Member Functions

 CCircularIndex (unsigned int size, unsigned int start)
 
unsigned int fill () const
 
void insert_one ()
 
void new_start (unsigned int start)
 
unsigned int next () const
 
unsigned int value (unsigned int i) const
 

Detailed Description

A class to adress a circulat bufer of a fixed size.

This class provides the structure for the translation of a linear index to a circular buffer. An example for its use can be found in mia/3d/translate/spline.cc: on_grid (BLAS_VERSION)

Definition at line 38 of file index.hh.

Constructor & Destructor Documentation

CCircularIndex::CCircularIndex ( unsigned int  size,
unsigned int  start 
)

Construct the buffer

Parameters
sizesize ofthe buffer
startstart index

Member Function Documentation

unsigned int CCircularIndex::fill ( ) const
Returns
the number of occupied indices
void CCircularIndex::insert_one ( )

Insert one index

void CCircularIndex::new_start ( unsigned int  start)

reset the start index

unsigned int CCircularIndex::next ( ) const

get the next index

unsigned int CCircularIndex::value ( unsigned int  i) const

Translate the linear index i to the index in the circular buffer

Parameters
i
Returns
circular index

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