Public Member Functions | Public Attributes
alvar::Index Struct Reference

Class for N-dimensional index to be used e.g. with STL maps. More...

#include <Util.h>

List of all members.

Public Member Functions

 Index (int a)
 Constructor for 1D index.
 Index (int a, int b)
 Constructor for 2D index.
 Index (int a, int b, int c)
 Constructor for 3D index.
bool operator< (const Index &index) const
 Operator used for sorting the multidimensional indices (last dimension being the most significant)

Public Attributes

std::vector< int > val
 The indices for each dimension are stored in val (last being the most significant)

Detailed Description

Class for N-dimensional index to be used e.g. with STL maps.

The idea is that if you want to sort N-dimensional pointers (e.g. when they are stored in STL maps) it is enough to have the 'operator<' working, instead of needing to calculate something like i=z*x_res*y_res + y*x_res + x;

Definition at line 236 of file Util.h.


Constructor & Destructor Documentation

alvar::Index::Index ( int  a)

Constructor for 1D index.

Definition at line 245 of file Util.cpp.

alvar::Index::Index ( int  a,
int  b 
)

Constructor for 2D index.

Definition at line 247 of file Util.cpp.

alvar::Index::Index ( int  a,
int  b,
int  c 
)

Constructor for 3D index.

Definition at line 252 of file Util.cpp.


Member Function Documentation

bool alvar::Index::operator< ( const Index index) const

Operator used for sorting the multidimensional indices (last dimension being the most significant)

Definition at line 258 of file Util.cpp.


Member Data Documentation

std::vector<int> alvar::Index::val

The indices for each dimension are stored in val (last being the most significant)

Definition at line 238 of file Util.h.


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


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Sun Oct 5 2014 22:16:27