CCircularIndex Class Reference
Uncategorized

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::CCircularIndex | ( | unsigned int | size,
|  | unsigned int | start )

Construct the buffer

Parameters

  size | size of the buffer
  start | start index

## Member Function Documentation

## fill()

unsigned int CCircularIndex::fill | ( |  | ) | const

Returns
  the number of occupied indices

## insert_one()

void CCircularIndex::insert_one | ( |  | ) |

Insert one index

## new_start()

void CCircularIndex::new_start | ( | unsigned int | start | ) |

reset the start index

## next()

unsigned int CCircularIndex::next | ( |  | ) | const

get the next index

## value()

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:

- index.hh