Iterator Class Reference

API: cKSplit::Iterator Class Reference
API
cKSplit::Iterator Class Reference

Public Member Functions

 Iterator (const cKSplit &ksplit, bool atbeginning=true)
void init (const cKSplit &ksplit, bool atbeginning=true)
void operator++ (int)
void operator-- (int)
bool end () const
int getCellNumber () const
double getCellMin () const
double getCellMax () const
double getCellSize () const
double getCellValue () const

Description

Walks along cells of the distribution stored in a cKSplit object.

Constructor & Destructor Documentation

◆ Iterator()

Iterator ( const cKSplit & ksplit,
bool atbeginning = true )

Constructor.

References cKSplit::cKSplit().

Member Function Documentation

◆ init()

void init ( const cKSplit & ksplit,
bool atbeginning = true )

Reinitializes the iterator.

References cKSplit::cKSplit().

◆ operator++()

void operator++ ( int )

Moves the iterator to the next cell.

◆ operator--()

void operator-- ( int )

Moves the iterator to the previous cell.

◆ end()

bool end ( ) const
inline

Returns true if the iterator has reached either end of the cell sequence.

◆ getCellNumber()

int getCellNumber ( ) const
inline

Returns the index of the current cell.

◆ getCellMin()

double getCellMin ( ) const
inline

Returns the upper lower of the current cell.

◆ getCellMax()

double getCellMax ( ) const
inline

Returns the upper bound of the current cell.

◆ getCellSize()

double getCellSize ( ) const
inline

Returns the size of the current cell.

◆ getCellValue()

double getCellValue ( ) const

Returns the actual amount of observations in current cell. This is not necessarily an integer value because of previous cell splits.