KrisLibrary
1.0.0
|
An N-D array class. More...
#include <arraynd.h>
Classes | |
struct | iterator |
Public Member Functions | |
ArrayND (const ArrayND< T > &rhs) | |
ArrayND (const Array2D< T > &rhs) | |
ArrayND (const Array3D< T > &rhs) | |
ArrayND (int dim1) | |
ArrayND (int dim1, int dim2) | |
ArrayND (int dim1, int dim2, int dim3) | |
ArrayND (const std::vector< int > &dims) | |
ArrayND (const IntTuple &dims) | |
void | clear () |
size_t | numDims () const |
size_t | numValues () const |
const std::vector< int > & | size () const |
void | resize (const std::vector< int > &newdims) |
note: resize is destructive | |
void | resize (const IntTuple &dims) |
void | resize (int dim1) |
void | resize (int dim1, int dim2) |
void | resize (int dim1, int dim2, int dim3) |
void | set (T val) |
const ArrayND< T > & | operator= (const ArrayND< T > &rhs) |
const ArrayND< T > & | operator= (const std::vector< T > &rhs) |
const ArrayND< T > & | operator= (const Array2D< T > &rhs) |
const ArrayND< T > & | operator= (const Array3D< T > &rhs) |
bool | operator== (const ArrayND< T > &rhs) const |
ArrayNDRef< T > | operator[] (int i) |
T & | operator[] (const std::vector< int > &index) |
const T & | operator[] (const std::vector< int > &index) const |
T & | operator[] (const IntTuple &index) |
const T & | operator[] (const IntTuple &index) const |
void | getSubArray (const std::vector< int > &imin, const std::vector< int > &imax, ArrayND< T > &subArray) const |
void | setSubArray (const std::vector< int > &imin, const std::vector< int > &imax, const ArrayND< T > &subArray) |
void | getSlice (const std::vector< int > &dimIndices, ArrayND< T > &slice) const |
void | setSlice (const std::vector< int > &dimIndices, const ArrayND< T > &slice) |
int | indexToOffset (const std::vector< int > &index) const |
void | indexToOffset (const IntTuple &index) const |
int | incOffset (int offset, int dim) const |
int | decOffset (int offset, int dim) const |
std::vector< int > | offsetToIndex (int offset) const |
iterator | begin () |
iterator | begin (const std::vector< int > &index) |
iterator | end () |
Public Attributes | |
std::vector< int > | dims |
std::vector< int > | strides |
std::vector< T > | values |
An N-D array class.