Matrix of primitive numeric values. More...
#include <mat.hpp>
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 |
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.
Definition at line 92 of file mat.hpp.
References Mat< T >::_size, and Mat< T >::_v.
Definition at line 99 of file mat.hpp.
References Mat< T >::_size, and Mat< T >::_v.
Definition at line 111 of file mat.hpp.
References Mat< T >::_v.
T * Mat< T >::data | ( | ) | [inline] |
Definition at line 189 of file mat.hpp.
References Mat< T >::_v.
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().
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.
Definition at line 344 of file mat.hpp.
References Mat< T >::_size, and Mat< T >::_v.
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.
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.
Definition at line 321 of file mat.hpp.
References Mat< T >::_xs, Mat< T >::_ys, and Vec< T >::size().
Definition at line 300 of file mat.hpp.
References Mat< T >::_xs, and Mat< T >::_ys.
Definition at line 260 of file mat.hpp.
References Mat< T >::_xs, and Mat< T >::_ys.
Definition at line 311 of file mat.hpp.
References Mat< T >::_xs, and Mat< T >::_ys.
Definition at line 214 of file mat.hpp.
References Mat< T >::_xs, and Mat< T >::_ys.
Definition at line 226 of file mat.hpp.
References Mat< T >::_xs, and Mat< T >::_ys.
Definition at line 283 of file mat.hpp.
References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.
Definition at line 237 of file mat.hpp.
References Mat< T >::_xs, and Mat< T >::_ys.
Definition at line 249 of file mat.hpp.
References Mat< T >::_xs, and Mat< T >::_ys.
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.
Definition at line 354 of file mat.hpp.
References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.
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.
Definition at line 365 of file mat.hpp.
References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.
Definition at line 292 of file mat.hpp.
References Mat< T >::_size, and Mat< T >::_v.
Definition at line 195 of file mat.hpp.
References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.
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.
Definition at line 334 of file mat.hpp.
References Mat< T >::_size, and Mat< T >::_v.
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.
Definition at line 376 of file mat.hpp.
References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.
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.
Definition at line 387 of file mat.hpp.
References Mat< T >::_size, Mat< T >::_v, Mat< T >::_xs, and Mat< T >::_ys.
Definition at line 158 of file mat.hpp.
References Mat< T >::_xs, and Mat< T >::_ys.
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().
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().
int Mat< T >::xs | ( | ) | const [inline] |
Definition at line 132 of file mat.hpp.
References Mat< T >::_xs.
Referenced by backwardSubstitution(), forwardSubstitution(), and lu().
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().
Definition at line 75 of file mat.hpp.
Referenced by Mat< T >::Mat(), Mat< T >::operator!=(), Mat< T >::operator-(), Mat< T >::operator<(), Mat< T >::operator<=(), Mat< T >::operator=(), Mat< T >::operator==(), Mat< T >::operator>(), Mat< T >::operator>=(), and Mat< T >::setSize().
Definition at line 76 of file mat.hpp.
Referenced by Mat< T >::data(), Mat< T >::Mat(), Mat< T >::operator!=(), Mat< T >::operator()(), Mat< T >::operator-(), Mat< T >::operator<(), Mat< T >::operator<=(), Mat< T >::operator=(), Mat< T >::operator==(), Mat< T >::operator>(), Mat< T >::operator>=(), Mat< T >::setSize(), Mat< T >::swapRows(), and Mat< T >::~Mat().
Definition at line 74 of file mat.hpp.
Referenced by Mat< T >::operator()(), Mat< T >::operator*(), Mat< T >::operator*=(), Mat< T >::operator+(), Mat< T >::operator+=(), Mat< T >::operator-(), Mat< T >::operator-=(), Mat< T >::operator<(), Mat< T >::operator<=(), Mat< T >::operator=(), Mat< T >::operator>(), Mat< T >::operator>=(), Mat< T >::operator~(), Mat< T >::setSize(), Mat< T >::swapRows(), and Mat< T >::xs().
Definition at line 74 of file mat.hpp.
Referenced by Mat< T >::operator()(), Mat< T >::operator*(), Mat< T >::operator*=(), Mat< T >::operator+(), Mat< T >::operator+=(), Mat< T >::operator-(), Mat< T >::operator-=(), Mat< T >::operator<(), Mat< T >::operator<=(), Mat< T >::operator=(), Mat< T >::operator>(), Mat< T >::operator>=(), Mat< T >::operator~(), Mat< T >::setSize(), Mat< T >::swapRows(), and Mat< T >::ys().