Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

Mat< T > Class Template Reference

Matrix of primitive numeric values. More...

#include <mat.hpp>

List of all members.

Public Member Functions

 Mat ()
 Mat (int xs, int ys)
 Mat (const Mat &)
 ~Mat ()
void setSize (int xs, int ys)
int xs () const
int ys () const
T & operator() (int x, int y)
const T & operator() (int x, int y) const
Mat< T > operator~ () const
void swapRows (int r0, int r1)
const T * data () const
T * data ()
Mat< T > & operator= (const Mat< T > &)
Mat< T > operator+ (const Mat< T > &) const
Mat< T > & operator+= (const Mat< T > &)
Mat< T > operator- (const Mat< T > &) const
Mat< T > & operator-= (const Mat< T > &)
Mat< T > operator* (const Mat< T > &) const
Mat< T > & operator*= (const Mat< T > &)
Mat< T > operator- () const
Mat< T > & operator= (const T &)
Mat< T > operator* (const T &) const
Mat< T > & operator*= (const T &)
Vec< T > operator* (const Vec< T > &v) const
bool operator== (const Mat< T > &) const
bool operator!= (const Mat< T > &) const
bool operator< (const Mat< T > &) const
bool operator<= (const Mat< T > &) const
bool operator> (const Mat< T > &) const
bool operator>= (const Mat< T > &) const
bool operator== (const T &t) const
bool operator!= (const T &t) const
bool operator< (const T &t) const
bool operator<= (const T &t) const
bool operator> (const T &t) const
bool operator>= (const T &t) const

Private Attributes

int _xs
int _ys
int _size
T * _v

Detailed Description

template<class T>
class Mat< T >

Matrix of primitive numeric values.

This implementation is built for speed. It does not work with non-primitive types!

Definition at line 25 of file mat.hpp.


Constructor & Destructor Documentation

template<class T >
Mat< T >::Mat (  )  [inline]

Definition at line 87 of file mat.hpp.

template<class T >
Mat< T >::Mat ( int  xs,
int  ys 
) [inline, explicit]

Definition at line 92 of file mat.hpp.

References Mat< T >::_size, and Mat< T >::_v.

template<class T >
Mat< T >::Mat ( const Mat< T > &  m  )  [inline]

Definition at line 99 of file mat.hpp.

References Mat< T >::_size, and Mat< T >::_v.

template<class T >
Mat< T >::~Mat (  )  [inline]

Definition at line 111 of file mat.hpp.

References Mat< T >::_v.


Member Function Documentation

template<class T >
T * Mat< T >::data (  )  [inline]

Definition at line 189 of file mat.hpp.

References Mat< T >::_v.

template<class T >
const T * Mat< T >::data (  )  const [inline]

Definition at line 183 of file mat.hpp.

References Mat< T >::_v.

Referenced by backwardSubstitution(), forwardSubstitution(), and lu().

template<class T >
bool Mat< T >::operator!= ( const T &  t  )  const [inline]

Definition at line 408 of file mat.hpp.

References Mat< T >::_size, and Mat< T >::_v.

template<class T >
bool Mat< T >::operator!= ( const Mat< T > &  m  )  const [inline]

Definition at line 344 of file mat.hpp.

References Mat< T >::_size, and Mat< T >::_v.

template<class T >
const T & Mat< T >::operator() ( int  x,
int  y 
) const [inline]

Definition at line 151 of file mat.hpp.

References Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
T & Mat< T >::operator() ( int  x,
int  y 
) [inline]

Definition at line 144 of file mat.hpp.

References Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
Vec< T > Mat< T >::operator* ( const Vec< T > &  v  )  const [inline]

Definition at line 321 of file mat.hpp.

References Mat< T >::_xs, Mat< T >::_ys, and Vec< T >::size().

template<class T >
Mat< T > Mat< T >::operator* ( const T &  t  )  const [inline]

Definition at line 300 of file mat.hpp.

References Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
Mat< T > Mat< T >::operator* ( const Mat< T > &  m  )  const [inline]

Definition at line 260 of file mat.hpp.

References Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
Mat< T > & Mat< T >::operator*= ( const T &  t  )  [inline]

Definition at line 311 of file mat.hpp.

References Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
Mat< T > & Mat< T >::operator*= ( const Mat< T > &  m  )  [inline]

Definition at line 276 of file mat.hpp.

template<class T >
Mat< T > Mat< T >::operator+ ( const Mat< T > &  m  )  const [inline]

Definition at line 214 of file mat.hpp.

References Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
Mat< T > & Mat< T >::operator+= ( const Mat< T > &  m  )  [inline]

Definition at line 226 of file mat.hpp.

References Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
Mat< T > Mat< T >::operator- (  )  const [inline]

Definition at line 283 of file mat.hpp.

References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
Mat< T > Mat< T >::operator- ( const Mat< T > &  m  )  const [inline]

Definition at line 237 of file mat.hpp.

References Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
Mat< T > & Mat< T >::operator-= ( const Mat< T > &  m  )  [inline]

Definition at line 249 of file mat.hpp.

References Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
bool Mat< T >::operator< ( const T &  t  )  const [inline]

Definition at line 418 of file mat.hpp.

References Mat< T >::_size, and Mat< T >::_v.

template<class T >
bool Mat< T >::operator< ( const Mat< T > &  m  )  const [inline]

Definition at line 354 of file mat.hpp.

References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
bool Mat< T >::operator<= ( const T &  t  )  const [inline]

Definition at line 428 of file mat.hpp.

References Mat< T >::_size, and Mat< T >::_v.

template<class T >
bool Mat< T >::operator<= ( const Mat< T > &  m  )  const [inline]

Definition at line 365 of file mat.hpp.

References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
Mat< T > & Mat< T >::operator= ( const T &  t  )  [inline]

Definition at line 292 of file mat.hpp.

References Mat< T >::_size, and Mat< T >::_v.

template<class T >
Mat< T > & Mat< T >::operator= ( const Mat< T > &  m  )  [inline]

Definition at line 195 of file mat.hpp.

References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
bool Mat< T >::operator== ( const T &  t  )  const [inline]

Definition at line 398 of file mat.hpp.

References Mat< T >::_size, and Mat< T >::_v.

template<class T >
bool Mat< T >::operator== ( const Mat< T > &  m  )  const [inline]

Definition at line 334 of file mat.hpp.

References Mat< T >::_size, and Mat< T >::_v.

template<class T >
bool Mat< T >::operator> ( const T &  t  )  const [inline]

Definition at line 438 of file mat.hpp.

References Mat< T >::_size, and Mat< T >::_v.

template<class T >
bool Mat< T >::operator> ( const Mat< T > &  m  )  const [inline]

Definition at line 376 of file mat.hpp.

References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
bool Mat< T >::operator>= ( const T &  t  )  const [inline]

Definition at line 448 of file mat.hpp.

References Mat< T >::_size, and Mat< T >::_v.

template<class T >
bool Mat< T >::operator>= ( const Mat< T > &  m  )  const [inline]

Definition at line 387 of file mat.hpp.

References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
Mat< T > Mat< T >::operator~ (  )  const [inline]

Definition at line 158 of file mat.hpp.

References Mat< T >::_xs, and Mat< T >::_ys.

template<class T >
void Mat< T >::setSize ( int  xs,
int  ys 
) [inline]

Definition at line 118 of file mat.hpp.

References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.

Referenced by lu().

template<class T >
void Mat< T >::swapRows ( int  r0,
int  r1 
) [inline]

Definition at line 169 of file mat.hpp.

References Mat< T >::_v, Mat< T >::_xs, Mat< T >::_ys, and SWAP.

Referenced by lu().

template<class T >
int Mat< T >::xs (  )  const [inline]

Definition at line 132 of file mat.hpp.

References Mat< T >::_xs.

Referenced by backwardSubstitution(), forwardSubstitution(), and lu().

template<class T >
int Mat< T >::ys (  )  const [inline]

Definition at line 138 of file mat.hpp.

References Mat< T >::_ys.

Referenced by backwardSubstitution(), forwardSubstitution(), lsSolve(), and lu().


Member Data Documentation

template<class T>
int Mat< T >::_size [private]
template<class T>
T* Mat< T >::_v [private]
template<class T>
int Mat< T >::_xs [private]
template<class T>
int Mat< T >::_ys [private]

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


6 Jan 2011 Doxygen 1.6.3