Class for N-dimensional index to be used e.g. with STL maps. More...
#include <Util.h>
| Public Member Functions | |
| Index (int a) | |
| Constructor for 1D index.  More... | |
| Index (int a, int b) | |
| Constructor for 2D index.  More... | |
| Index (int a, int b, int c) | |
| Constructor for 3D index.  More... | |
| bool | operator< (const Index &index) const | 
| Operator used for sorting the multidimensional indices (last dimension being the most significant)  More... | |
| Public Attributes | |
| std::vector< int > | val | 
| The indices for each dimension are stored in val (last being the most significant)  More... | |
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;
| alvar::Index::Index | ( | int | a, | 
| int | b | ||
| ) | 
| alvar::Index::Index | ( | int | a, | 
| int | b, | ||
| int | c | ||
| ) | 
| bool alvar::Index::operator< | ( | const Index & | index | ) | const | 
| std::vector<int> alvar::Index::val |