Djinni
2.2
|
A recursive templatized structure representing a matrix of arbitrary dimensionality. More...
#include <TSPTWWorld.h>
Public Types | |
typedef T | value_type |
Public Member Functions | |
Matrix (std::vector< Matrix< T, N-1 > > matrix) | |
const Matrix< T, N-1 > & | operator[] (const u_int32_t n) const |
Matrix< T, N-1 > & | operator[] (const u_int32_t n) |
u_int32_t | dimensions () const |
void | reset () |
u_int32_t | size () const |
void | push_back (Matrix< T, N-1 > matrix) |
void | resize (const u_int32_t n) |
Protected Attributes | |
std::vector< Matrix< T, N-1 > > | _matrix |
Static Protected Attributes | |
static const u_int32_t | DIMENSIONS = N |
A recursive templatized structure representing a matrix of arbitrary dimensionality.
Originally we had our own Matrix class to provide arbitrary dimensions, but implemented it via runtime checks and nonrecursive structures. As it turns out this was precisely the wrong thing to do. Switching to a recursive template resulted in immense performance improvements.
Definition at line 22 of file TSPTWWorld.h.