Public Member Functions | Protected Member Functions | Protected Attributes
alvar::IntIndex Class Reference

Class for calculating "evenly spaced" integer indices for data sequence. More...

#include <IntegralImage.h>

List of all members.

Public Member Functions

int end () const
 For testing have we reached the end.
int get () const
 Get the index value.
int get_next_step () const
 How much the index will be increased with the next next()
 IntIndex (int _res, int _steps)
 Create IntIndex for indexing _res elements in predefined amount of _steps .
int next ()
 Take the next integer index step.
int operator= (int v)
 Set the integer index to the "grid" value nearest to v .

Protected Member Functions

void update_next_step ()

Protected Attributes

int estep
int index
int next_step
int res
int step
int step_remainder
int steps

Detailed Description

Class for calculating "evenly spaced" integer indices for data sequence.

If we have a data sequence we want to step through in certain amount of steps, IntIndex can be used for iterating through the steps using fast integer implementation. This class is related to stride iterators.

Usage

 int data[x_res];
 for (IntIndex x(x_res, sub_res); x.get() != x.end(); x.next()) {
     std::cout<<"data["<<x.get()<<"] is "<<data[x.get()]<<std::endl;
     ...
 }

Definition at line 55 of file IntegralImage.h.


Constructor & Destructor Documentation

alvar::IntIndex::IntIndex ( int  _res,
int  _steps 
)

Create IntIndex for indexing _res elements in predefined amount of _steps .

Parameters:
_resThe number of elements in the data sequence we want to index.
_stepsThe number of steps to use to cover the _res elements (_steps < _res)

Definition at line 37 of file IntegralImage.cpp.


Member Function Documentation

int alvar::IntIndex::end ( ) const

For testing have we reached the end.

Definition at line 62 of file IntegralImage.cpp.

int alvar::IntIndex::get ( ) const

Get the index value.

Definition at line 56 of file IntegralImage.cpp.

How much the index will be increased with the next next()

Definition at line 59 of file IntegralImage.cpp.

Take the next integer index step.

Definition at line 51 of file IntegralImage.cpp.

int alvar::IntIndex::operator= ( int  v)

Set the integer index to the "grid" value nearest to v .

Definition at line 42 of file IntegralImage.cpp.

void alvar::IntIndex::update_next_step ( ) [protected]

Definition at line 28 of file IntegralImage.cpp.


Member Data Documentation

int alvar::IntIndex::estep [protected]

Definition at line 60 of file IntegralImage.h.

int alvar::IntIndex::index [protected]

Definition at line 57 of file IntegralImage.h.

int alvar::IntIndex::next_step [protected]

Definition at line 61 of file IntegralImage.h.

int alvar::IntIndex::res [protected]

Definition at line 62 of file IntegralImage.h.

int alvar::IntIndex::step [protected]

Definition at line 58 of file IntegralImage.h.

Definition at line 59 of file IntegralImage.h.

int alvar::IntIndex::steps [protected]

Definition at line 63 of file IntegralImage.h.


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


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Sat Dec 28 2013 16:46:16