MeVisLab Toolbox Reference
|
Declaration of matrix type traits. More...
#include <mlMatrix2.h>
Public Types | |
typedef DT | ComponentType |
A typedef to 'export' the type of components. | |
![]() | |
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. | |
typedef Tvec2< DT > | VectorType |
A typedef to 'export' the type of component vector. | |
Public Member Functions | |
bool | operator< (const Tmat2< DT > &) const |
Dummy 'lesser than operator' that always returns false . | |
Operators and indexing functionality. | |
const Tmat2< DT > & | operator= (const Tmat2< DT > &m) |
Assigns from a Tmat2. | |
const Tmat2< DT > & | operator+= (const Tmat2< DT > &m) |
Increments by a Tmat2. | |
const Tmat2< DT > & | operator-= (const Tmat2< DT > &m) |
Decrements by a Tmat2. | |
const Tmat2< DT > & | operator*= (const DT d) |
Multiplies by a constant d . | |
const Tmat2< DT > & | operator/= (const DT d) |
Divides by a constant d . Division by zero is not handled and must be avoided by caller. | |
Special functions for class Tmat2. | |
DT | det () const |
Returns the determinant of this matrix. | |
Tmat2< DT > | transpose () const |
Returns the transposed matrix. | |
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. | |
![]() | |
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. | |
void | getValuesToPtr (ComponentType *values) const |
Copies contents of *this into an array matrix, row by row; type and size must match. | |
Constructors, set, and get methods. | |
Tmat2 () | |
Constructs the matrix from four zero elements. | |
Tmat2 (const DT diagValue) | |
Constructs the matrix that has the argument diagValue as the diagonal values, zero otherwise. | |
Tmat2 (const Tvec2< DT > &row0, const Tvec2< DT > &row1) | |
Composes a matrix from the two vectors row0 and row1 . | |
Tmat2 (const Tmat2< DT > &mat) | |
Copy constructor from the Tmat2 mat . | |
Tmat2 (const float mat[4]) | |
Constructor from four floating point values in an array given by mat , row by row. | |
Tmat2 (const double mat[4]) | |
Constructor from four double values in an array given by mat , row by row. | |
Tmat2 (const DT in00, const DT in01, const DT in10, const DT in11) | |
Initializes all matrix elements explicitly with scalars, row by row. | |
void | setValues (const float mat[4]) |
Copies the contents of mat into *this, row by row. | |
void | getValues (float mat[4]) const |
Copies the contents of *this into mat , row by row. | |
void | setValues (const double mat[4]) |
Copies the contents of mat into *this, row by row. | |
void | getValues (double mat[4]) const |
Copies the contents of *this into mat , row by row. | |
void | set (const DT val) |
Sets all values to val . | |
void | setScaleMatrix (const DT scale) |
Sets a diagonal matrix with scale on the diagonal. | |
static Tmat2< DT > | getMat (const DT val) |
Returns a matrix filled with values val . | |
static Tmat2< DT > | getIdentity () |
Returns the identity matrix. | |
Additional Inherited Members | |
![]() | |
Tvec2< DT > | v [size] |
The rows constituting the matrix. | |
Declaration of matrix type traits.
A 2x2 matrix class consisting of two row vectors.
Definition at line 34 of file mlMatrix2.h.
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.
References mlrange_cast().
Constructs the matrix that has the argument diagValue
as the diagonal values, zero otherwise.
Definition at line 156 of file mlMatrix2.h.
References mlrange_cast().
|
inline |
Composes a matrix from the two vectors row0
and row1
.
Definition at line 165 of file mlMatrix2.h.
References mlrange_cast().
Copy constructor from the Tmat2 mat
.
Definition at line 174 of file mlMatrix2.h.
References mlrange_cast(), and 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.
References mlrange_cast().
Constructor from four double values in an array given by mat
, row by row.
Definition at line 189 of file mlMatrix2.h.
References mlrange_cast().
|
inline |
Initializes all matrix elements explicitly with scalars, row by row.
Definition at line 196 of file mlMatrix2.h.
References mlrange_cast().
|
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(), and mlrange_cast().
Referenced by ml::Tmat2< DT >::apply().
Returns the determinant of this matrix.
Definition at line 279 of file mlMatrix2.h.
Returns a matrix filled with values val
.
Definition at line 241 of file mlMatrix2.h.
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.
References mlrange_cast().
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.
References mlrange_cast().
Definition at line 311 of file mlMatrix2.h.
References ML_BAD_PARAMETER, mlrange_cast(), 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 mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Decrements by a Tmat2.
Definition at line 376 of file mlMatrix2.h.
References mlrange_cast(), and 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 mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Sets a diagonal matrix with scale
on the diagonal.
Definition at line 263 of file mlMatrix2.h.
Copies the contents of mat
into *this, row by row.
Definition at line 213 of file mlMatrix2.h.
References mlrange_cast().
Copies the contents of mat
into *this, row by row.
Definition at line 205 of file mlMatrix2.h.
References mlrange_cast().
Returns the transposed matrix.
Definition at line 286 of file mlMatrix2.h.
References mlrange_cast().
Referenced by ml::operator*().