matrix Class Template Reference

#include <matrix.hpp>

Inheritance diagram for matrix:

Inheritance graph
[legend]
Collaboration diagram for matrix:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<int R, int C, typename T = gsgl::real_t>
class gsgl::math::matrix< R, C, T >

A generic matrix class.

Implements an RxC matrix, where R is the number of rows and C is the number of columns.

Definition at line 54 of file matrix.hpp.


Public Member Functions

void from_stream (io::text_stream &s)
T & item (int i, int j)
const T & item (int i, int j) const
 matrix (const matrix< R, C, T > &)
 matrix (const T *)
 Initializes the matrix from an array in column-major order.
 matrix ()
matrixoperator= (const matrix< R, C, T > &)
bool operator== (const matrix< R, C, T > &m) const
T * ptr ()
const T * ptr () const
 Returns an array containing the matrix's data, in column-major order.
void to_stream (io::text_stream &s) const
virtual ~matrix ()

Protected Attributes

data [R *C]

Constructor & Destructor Documentation

matrix (  )  [inline]

Definition at line 83 of file matrix.hpp.

References matrix::data.

matrix ( const T *  ptr  )  [inline, explicit]

Initializes the matrix from an array in column-major order.

Definition at line 90 of file matrix.hpp.

References matrix::data.

matrix ( const matrix< R, C, T > &  m  )  [inline]

Definition at line 97 of file matrix.hpp.

References matrix::data.

~matrix (  )  [inline, virtual]

Definition at line 111 of file matrix.hpp.


Member Function Documentation

void from_stream ( io::text_stream s  )  [inline]

Definition at line 145 of file matrix.hpp.

References matrix::item().

T& item ( int  i,
int  j 
) [inline]

Definition at line 67 of file matrix.hpp.

const T& item ( int  i,
int  j 
) const [inline]

matrix< R, C, T > & operator= ( const matrix< R, C, T > &  m  )  [inline]

Definition at line 104 of file matrix.hpp.

References matrix::data.

bool operator== ( const matrix< R, C, T > &  m  )  const [inline]

Definition at line 118 of file matrix.hpp.

References matrix::data.

T* ptr (  )  [inline]

Definition at line 71 of file matrix.hpp.

const T* ptr (  )  const [inline]

void to_stream ( io::text_stream s  )  const [inline]

Definition at line 130 of file matrix.hpp.

References matrix::item().


Member Data Documentation

T data[R *C] [protected]


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

Generated on Sat Mar 1 13:50:06 2008 for Periapsis Project by  doxygen 1.5.5