Djinni  2.2
Public Types | Public Member Functions | Protected Attributes | Static Protected Attributes
Matrix< T, 1 > Class Template Reference

A recursive templatized structure representing a one-dimensional matrix. More...

#include <TSPTWWorld.h>

List of all members.

Public Types

typedef T value_type

Public Member Functions

 Matrix (std::vector< T > vec)
const T & operator[] (const u_int32_t n) const
T & operator[] (const u_int32_t n)
u_int32_t dimensions () const
void reset ()
u_int32_t size () const
void push_back (std::vector< T > vec)
void resize (const u_int32_t n)

Protected Attributes

std::vector< T > _matrix

Static Protected Attributes

static const u_int32_t DIMENSIONS = 1

Detailed Description

template<typename T>
class Matrix< T, 1 >

A recursive templatized structure representing a one-dimensional matrix.

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.

Author:
Hansen
Since:
2.2.2

Definition at line 61 of file TSPTWWorld.h.


The documentation for this class was generated from the following file: