ML Reference
|
Declaration of matrix type traits. More...
#include <mlMatrix2.h>
Public Types | |
typedef DT | ComponentType |
A typedef to 'export' the type of components. More... | |
![]() | |
enum | |
This enum grants access to the row count during compile time, e.g., it can be used as a template argument. More... | |
enum | |
This enum grants access to the row count during compile time, e.g., it can be used as a template argument. More... | |
enum | |
This enum grants access to the number of values in the matrix, e.g., it can be used as a template argument. More... | |
typedef VectorT::ComponentType | ComponentType |
A typedef to 'export' the type of subcomponents. More... | |
typedef Tvec2< DT > | VectorType |
A typedef to 'export' the type of component vector. More... | |
Public Member Functions | |
bool | operator< (const Tmat2< DT > &) const |
Dummy 'lesser than operator' that always returns false . More... | |
Operators and indexing functionality. | |
const Tmat2< DT > & | operator= (const Tmat2< DT > &m) |
Assigns from a Tmat2. More... | |
const Tmat2< DT > & | operator+= (const Tmat2< DT > &m) |
Increments by a Tmat2. More... | |
const Tmat2< DT > & | operator-= (const Tmat2< DT > &m) |
Decrements by a Tmat2. More... | |
const Tmat2< DT > & | operator*= (const DT d) |
Multiplies by a constant d . More... | |
const Tmat2< DT > & | operator/= (const DT d) |
Divides by a constant d . Division by zero is not handled and must be avoided by caller. More... | |
Special functions for class Tmat2. | |
DT | det () const |
Returns the determinant of this matrix. More... | |
Tmat2< DT > | transpose () const |
Returns the transposed matrix. More... | |
Tmat2< DT > | inverse (bool *isInvertible=nullptr) const |
const Tmat2< DT > & | apply (MLDblFuncPtr fct) |
Applies the method fct to all vectors of *this and returns the matrix. More... | |
![]() | |
const Tvec2< DT > & | operator[] (const size_t i) const |
Tvec2< DT > & | operator[] (const size_t i) |
ComponentType & | linearIndexed (const size_t idx) |
ComponentType | linearIndexedConst (const size_t idx) const |
ComponentType | compAbsSum () const |
void | setValuesFromPtr (const ComponentType *const values) |
Copies the contents from an array matrix into *this, row by row; type and size must match. More... | |
void | getValuesToPtr (ComponentType *values) const |
Copies contents of *this into an array matrix, row by row; type and size must match. More... | |
Constructors, set, and get methods. | |
Tmat2 () | |
Constructs the matrix from four zero elements. More... | |
Tmat2 (const DT diagValue) | |
Constructs the matrix that has the argument diagValue as the diagonal values, zero otherwise. More... | |
Tmat2 (const Tvec2< DT > &row0, const Tvec2< DT > &row1) | |
Composes a matrix from the two vectors row0 and row1 . More... | |
Tmat2 (const Tmat2< DT > &mat) | |
Copy constructor from the Tmat2 mat . More... | |
Tmat2 (const float mat[4]) | |
Constructor from four floating point values in an array given by mat , row by row. More... | |
Tmat2 (const double mat[4]) | |
Constructor from four double values in an array given by mat , row by row. More... | |
Tmat2 (const DT in00, const DT in01, const DT in10, const DT in11) | |
Initializes all matrix elements explicitly with scalars, row by row. More... | |
void | setValues (const float mat[4]) |
Copies the contents of mat into *this, row by row. More... | |
void | getValues (float mat[4]) const |
Copies the contents of *this into mat , row by row. More... | |
void | setValues (const double mat[4]) |
Copies the contents of mat into *this, row by row. More... | |
void | getValues (double mat[4]) const |
Copies the contents of *this into mat , row by row. More... | |
void | set (const DT val) |
Sets all values to val . More... | |
void | setScaleMatrix (const DT scale) |
Sets a diagonal matrix with scale on the diagonal. More... | |
static Tmat2< DT > | getMat (const DT val) |
Returns a matrix filled with values val . More... | |
static Tmat2< DT > | getIdentity () |
Returns the identity matrix. More... | |
Additional Inherited Members | |
![]() | |
Tvec2< DT > | v [size] |
The rows constituting the matrix. More... | |
Declaration of matrix type traits.
A 2x2 matrix class consisting of two row vectors.
Definition at line 34 of file mlMatrix2.h.
typedef DT ml::Tmat2< DT >::ComponentType |
A typedef to 'export' the type of components.
Definition at line 39 of file mlMatrix2.h.
Constructs the matrix from four zero elements.
Definition at line 149 of file mlMatrix2.h.
Constructs the matrix that has the argument diagValue
as the diagonal values, zero otherwise.
Definition at line 156 of file mlMatrix2.h.
|
inline |
Composes a matrix from the two vectors row0
and row1
.
Definition at line 165 of file mlMatrix2.h.
Copy constructor from the Tmat2 mat
.
Definition at line 174 of file mlMatrix2.h.
References ml::FloatingPointMatrix< VectorT, size >::v.
Constructor from four floating point values in an array given by mat
, row by row.
Definition at line 182 of file mlMatrix2.h.
Constructor from four double values in an array given by mat
, row by row.
Definition at line 189 of file mlMatrix2.h.
|
inline |
Initializes all matrix elements explicitly with scalars, row by row.
Definition at line 196 of file mlMatrix2.h.
|
inline |
Applies the method fct
to all vectors of *this and returns the matrix.
Definition at line 294 of file mlMatrix2.h.
References ml::Tmat2< DT >::apply().
Referenced by ml::Tmat2< DT >::apply().
|
inline |
Returns the determinant of this matrix.
Definition at line 279 of file mlMatrix2.h.
Returns the identity matrix.
Definition at line 256 of file mlMatrix2.h.
Returns a matrix filled with values val
.
Definition at line 241 of file mlMatrix2.h.
|
inline |
Copies the contents of *this into mat
, row by row.
Note that range and precision of the float values may not be sufficient for the double matrix contents.
Definition at line 233 of file mlMatrix2.h.
|
inline |
Copies the contents of *this into mat
, row by row.
Note that range and precision of the float values may not be sufficient for the double matrix contents.
Definition at line 223 of file mlMatrix2.h.
Definition at line 311 of file mlMatrix2.h.
References ML_BAD_PARAMETER, MLValueIs0WOM(), and ml::printTemplateError().
Multiplies by a constant d
.
Definition at line 385 of file mlMatrix2.h.
Increments by a Tmat2.
Definition at line 367 of file mlMatrix2.h.
References ml::FloatingPointMatrix< VectorT, size >::v.
Decrements by a Tmat2.
Definition at line 376 of file mlMatrix2.h.
References ml::FloatingPointMatrix< VectorT, size >::v.
Divides by a constant d
. Division by zero is not handled and must be avoided by caller.
Definition at line 394 of file mlMatrix2.h.
Dummy 'lesser than operator' that always returns false
.
It is needed to make class work with some STL containers on VC7.
Definition at line 100 of file mlMatrix2.h.
Assigns from a Tmat2.
Definition at line 356 of file mlMatrix2.h.
References ml::FloatingPointMatrix< VectorT, size >::v.
|
inline |
Sets all values to val
.
Definition at line 249 of file mlMatrix2.h.
|
inline |
Sets a diagonal matrix with scale
on the diagonal.
Definition at line 263 of file mlMatrix2.h.
|
inline |
Copies the contents of mat
into *this, row by row.
Definition at line 213 of file mlMatrix2.h.
|
inline |
Copies the contents of mat
into *this, row by row.
Definition at line 205 of file mlMatrix2.h.
Returns the transposed matrix.
Definition at line 286 of file mlMatrix2.h.
Referenced by ml::operator*().