yat
0.14.5pre
|
Class for storing indices of, e.g., a MatrixLookup. More...
#include <yat/utility/Index.h>
Public Types | |
typedef std::vector< size_t > ::const_iterator | const_iterator |
Public Member Functions | |
Index (void) | |
Index (size_t n) | |
Index (const Index &a, const Index &b) | |
Index (const SmartPtr< const std::vector< size_t > > &vec) | |
Constructor. | |
Index (const std::vector< size_t > &vec) | |
Constructor. More... | |
const_iterator | begin (void) const |
const_iterator | end (void) const |
const size_t & | operator[] (size_t) const |
access operator | |
size_t | size (void) const |
number of elements | |
const std::vector< size_t > & | vector (void) const |
Class for storing indices of, e.g., a MatrixLookup.
This class is basically a wrapper around std::vector<size_t>. The major differences are that the class is constant and copying is performed in constant time (shallow copy).
typedef std::vector<size_t>::const_iterator theplu::yat::utility::Index::const_iterator |
Read only iterator
theplu::yat::utility::Index::Index | ( | void | ) |
Creates an empty Index
|
explicit |
Constructed Index c will satisfy c[i]=a[b[i]]
|
explicit |
Constructor.
vec is copied
const_iterator theplu::yat::utility::Index::begin | ( | void | ) | const |
const_iterator theplu::yat::utility::Index::end | ( | void | ) | const |
const std::vector<size_t>& theplu::yat::utility::Index::vector | ( | void | ) | const |