#include <deprecated_matrix.h>
Public Types | |
typedef TYPE | ScalarType |
Public Member Functions | |
TYPE | Cofactor (unsigned int i, unsigned int j) const |
unsigned int | ColumnsNumber () const |
TYPE | Determinant () const |
template<int N, int M> | |
void | DotProduct (Point< N, TYPE > &m, Point< M, TYPE > &result) |
void | Dump () |
TYPE | ElementAt (unsigned int i, unsigned int j) |
TYPE * | GetColumn (const unsigned int j) |
TYPE * | GetRow (const unsigned int i) |
Matrix (const Matrix< TYPE > &m) | |
Matrix () | |
Matrix (unsigned int m, unsigned int n, TYPE *values) | |
Matrix (unsigned int m, unsigned int n) | |
bool | operator!= (const Matrix< TYPE > &m) const |
Matrix< TYPE > | operator* (const TYPE k) const |
Point3< TYPE > | operator* (Point3< TYPE > &p) const |
Matrix< TYPE > | operator* (const MatrixDiagBase &m) const |
ScalarType * | operator* (const ScalarType v[]) const |
Matrix< TYPE > | operator* (const Matrix< TYPE > &m) const |
Matrix< TYPE > & | operator*= (const TYPE k) |
Matrix< TYPE > | operator+ (const TYPE k) |
Matrix< TYPE > & | operator+= (const TYPE k) |
Matrix< TYPE > & | operator+= (const Matrix< TYPE > &m) |
Matrix< TYPE > | operator- () const |
Matrix< TYPE > | operator- (const TYPE k) |
Matrix< TYPE > & | operator-= (const TYPE k) |
Matrix< TYPE > & | operator-= (const Matrix< TYPE > &m) |
Matrix< TYPE > | operator/ (const TYPE k) |
Matrix< TYPE > & | operator/= (const TYPE k) |
Matrix< TYPE > & | operator= (const Matrix< TYPE > &m) |
bool | operator== (const Matrix< TYPE > &m) const |
const TYPE * | operator[] (const unsigned int i) const |
TYPE * | operator[] (const unsigned int i) |
template<int N, int M> | |
void | OuterProduct (const Point< N, TYPE > a, const Point< M, TYPE > b) |
void | Resize (const unsigned int m, const unsigned int n) |
unsigned int | RowsNumber () const |
void | SetColumn (const unsigned int j, TYPE *v) |
void | SetDiagonal (TYPE *v) |
void | SetIdentity () |
void | SetRow (const unsigned int i, TYPE *v) |
void | SetZero () |
void | SwapColumns (const unsigned int i, const unsigned int j) |
void | SwapRows (const unsigned int i, const unsigned int j) |
Matrix | transpose () |
void | Transpose () |
void | transposeInPlace () |
~Matrix () | |
Protected Attributes | |
unsigned int | _columns |
the number of matrix rows | |
ScalarType * | _data |
the matrix elements | |
unsigned int | _rows |
the number of matrix rows |
This class represent a generic m�n matrix. The class is templated over the scalar type field.
TYPE | (Templete Parameter) Specifies the ScalarType field. |
Definition at line 78 of file deprecated_matrix.h.
typedef TYPE vcg::ndim::Matrix< TYPE >::ScalarType |
Definition at line 82 of file deprecated_matrix.h.
vcg::ndim::Matrix< TYPE >::Matrix | ( | unsigned int | m, | |
unsigned int | n | |||
) | [inline] |
Default constructor All the elements are initialized to zero.
m | the number of matrix rows | |
n | the number of matrix columns |
Definition at line 90 of file deprecated_matrix.h.
vcg::ndim::Matrix< TYPE >::Matrix | ( | unsigned int | m, | |
unsigned int | n, | |||
TYPE * | values | |||
) | [inline] |
Constructor The matrix elements are initialized with the values of the elements in values.
m | the number of matrix rows | |
n | the number of matrix columns | |
values | the values of the matrix elements |
Definition at line 105 of file deprecated_matrix.h.
vcg::ndim::Matrix< TYPE >::Matrix | ( | ) | [inline] |
Empty constructor Just create the object
Definition at line 121 of file deprecated_matrix.h.
vcg::ndim::Matrix< TYPE >::Matrix | ( | const Matrix< TYPE > & | m | ) | [inline] |
Copy constructor The matrix elements are initialized with the value of the corresponding element in m
m | the matrix to be copied |
Definition at line 133 of file deprecated_matrix.h.
vcg::ndim::Matrix< TYPE >::~Matrix | ( | ) | [inline] |
Default destructor
Definition at line 149 of file deprecated_matrix.h.
TYPE vcg::ndim::Matrix< TYPE >::Cofactor | ( | unsigned int | i, | |
unsigned int | j | |||
) | const [inline] |
Return the cofactor Ai,j of the ai,j element
Definition at line 256 of file deprecated_matrix.h.
unsigned int vcg::ndim::Matrix< TYPE >::ColumnsNumber | ( | ) | const [inline] |
Number of columns
Definition at line 157 of file deprecated_matrix.h.
TYPE vcg::ndim::Matrix< TYPE >::Determinant | ( | ) | const [inline] |
Calculate and return the matrix determinant (Laplace)
Definition at line 222 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::DotProduct | ( | Point< N, TYPE > & | m, | |
Point< M, TYPE > & | result | |||
) | [inline] |
Matrix multiplication: calculates the cross product.
reference | to the matrix to multiply by |
Definition at line 505 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::Dump | ( | ) | [inline] |
Print all matrix elements
Definition at line 734 of file deprecated_matrix.h.
TYPE vcg::ndim::Matrix< TYPE >::ElementAt | ( | unsigned int | i, | |
unsigned int | j | |||
) | [inline] |
Return the element stored in the i-th rows at the j-th column
i | the row index | |
j | the column index |
Definition at line 211 of file deprecated_matrix.h.
TYPE* vcg::ndim::Matrix< TYPE >::GetColumn | ( | const unsigned int | j | ) | [inline] |
Get the j-th column on the matrix.
j | the column index. |
Definition at line 308 of file deprecated_matrix.h.
TYPE* vcg::ndim::Matrix< TYPE >::GetRow | ( | const unsigned int | i | ) | [inline] |
Get the i-th row on the matrix.
i | the column index. |
Definition at line 323 of file deprecated_matrix.h.
bool vcg::ndim::Matrix< TYPE >::operator!= | ( | const Matrix< TYPE > & | m | ) | const [inline] |
Inequality operator
m |
Definition at line 193 of file deprecated_matrix.h.
Matrix<TYPE> vcg::ndim::Matrix< TYPE >::operator* | ( | const TYPE | k | ) | const [inline] |
Scalar multiplication.
k | value to multiply every member by |
Definition at line 608 of file deprecated_matrix.h.
Point3<TYPE> vcg::ndim::Matrix< TYPE >::operator* | ( | Point3< TYPE > & | p | ) | const [inline] |
Matrix-vector multiplication.
reference | to the 3-dimensional vector to multiply by |
Definition at line 554 of file deprecated_matrix.h.
Matrix<TYPE> vcg::ndim::Matrix< TYPE >::operator* | ( | const MatrixDiagBase & | m | ) | const [inline] |
Matrix multiplication by a diagonal matrix
Definition at line 518 of file deprecated_matrix.h.
ScalarType* vcg::ndim::Matrix< TYPE >::operator* | ( | const ScalarType | v[] | ) | const [inline] |
Matrix-Vector product. Computes the product of the matrix by the vector v.
v | reference to the vector to multiply by |
Definition at line 487 of file deprecated_matrix.h.
Matrix<TYPE> vcg::ndim::Matrix< TYPE >::operator* | ( | const Matrix< TYPE > & | m | ) | const [inline] |
Matrix multiplication: calculates the cross product.
m | reference to the matrix to multiply by |
Definition at line 465 of file deprecated_matrix.h.
Matrix<TYPE>& vcg::ndim::Matrix< TYPE >::operator*= | ( | const TYPE | k | ) | [inline] |
(Modifier) Multiplies each element of this matrix by the scalar constant k.
k | the scalar constant |
Definition at line 440 of file deprecated_matrix.h.
Matrix<TYPE> vcg::ndim::Matrix< TYPE >::operator+ | ( | const TYPE | k | ) | [inline] |
Scalar sum.
k |
Definition at line 570 of file deprecated_matrix.h.
Matrix<TYPE>& vcg::ndim::Matrix< TYPE >::operator+= | ( | const TYPE | k | ) | [inline] |
(Modifier) Add to each element of this matrix the scalar constant k.
k | the scalar constant |
Definition at line 416 of file deprecated_matrix.h.
Matrix<TYPE>& vcg::ndim::Matrix< TYPE >::operator+= | ( | const Matrix< TYPE > & | m | ) | [inline] |
Adds a matrix m to this matrix.
m | reference to matrix to add to this |
Definition at line 388 of file deprecated_matrix.h.
Matrix<TYPE> vcg::ndim::Matrix< TYPE >::operator- | ( | ) | const [inline] |
Negate all matrix elements
Definition at line 595 of file deprecated_matrix.h.
Matrix<TYPE> vcg::ndim::Matrix< TYPE >::operator- | ( | const TYPE | k | ) | [inline] |
Scalar difference.
k |
Definition at line 583 of file deprecated_matrix.h.
Matrix<TYPE>& vcg::ndim::Matrix< TYPE >::operator-= | ( | const TYPE | k | ) | [inline] |
(Modifier) Subtract from each element of this matrix the scalar constant k.
k | the scalar constant |
Definition at line 428 of file deprecated_matrix.h.
Matrix<TYPE>& vcg::ndim::Matrix< TYPE >::operator-= | ( | const Matrix< TYPE > & | m | ) | [inline] |
Subtracts a matrix m to this matrix.
m | reference to matrix to subtract |
Definition at line 402 of file deprecated_matrix.h.
Matrix<TYPE> vcg::ndim::Matrix< TYPE >::operator/ | ( | const TYPE | k | ) | [inline] |
Scalar division.
k | value to divide every member by |
Definition at line 621 of file deprecated_matrix.h.
Matrix<TYPE>& vcg::ndim::Matrix< TYPE >::operator/= | ( | const TYPE | k | ) | [inline] |
(Modifier) Divides each element of this matrix by the scalar constant k.
k | the scalar constant |
Definition at line 452 of file deprecated_matrix.h.
Matrix<TYPE>& vcg::ndim::Matrix< TYPE >::operator= | ( | const Matrix< TYPE > & | m | ) | [inline] |
bool vcg::ndim::Matrix< TYPE >::operator== | ( | const Matrix< TYPE > & | m | ) | const [inline] |
Equality operator.
m |
Definition at line 176 of file deprecated_matrix.h.
const TYPE* vcg::ndim::Matrix< TYPE >::operator[] | ( | const unsigned int | i | ) | const [inline] |
Const subscript operator
i | the index of the row |
Definition at line 297 of file deprecated_matrix.h.
TYPE* vcg::ndim::Matrix< TYPE >::operator[] | ( | const unsigned int | i | ) | [inline] |
Subscript operator:
i | the index of the row |
Definition at line 286 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::OuterProduct | ( | const Point< N, TYPE > | a, | |
const Point< M, TYPE > | b | |||
) | [inline] |
Matrix from outer product.
Definition at line 535 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::Resize | ( | const unsigned int | m, | |
const unsigned int | n | |||
) | [inline] |
Resize the current matrix.
m | the number of matrix rows. | |
n | the number of matrix columns. |
Definition at line 692 of file deprecated_matrix.h.
unsigned int vcg::ndim::Matrix< TYPE >::RowsNumber | ( | ) | const [inline] |
Number of rows
Definition at line 166 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::SetColumn | ( | const unsigned int | j, | |
TYPE * | v | |||
) | [inline] |
Set the values of j-th column to v[j]
j | the column index | |
v | ... |
Definition at line 655 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::SetDiagonal | ( | TYPE * | v | ) | [inline] |
Set the diagonal elements vi,i to v[i]
v |
Definition at line 680 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::SetIdentity | ( | ) | [inline] |
Set the matrix to identity.
Definition at line 642 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::SetRow | ( | const unsigned int | i, | |
TYPE * | v | |||
) | [inline] |
Set the elements of the i-th row to v[j]
i | the row index | |
v | ... |
Definition at line 668 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::SetZero | ( | ) | [inline] |
Set all the matrix elements to zero.
Definition at line 633 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::SwapColumns | ( | const unsigned int | i, | |
const unsigned int | j | |||
) | [inline] |
Swaps the values of the elements between the i-th and the j-th column.
i | the index of the first column | |
j | the index of the second column |
Definition at line 338 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::SwapRows | ( | const unsigned int | i, | |
const unsigned int | j | |||
) | [inline] |
Swaps the values of the elements between the i-th and the j-th row.
i | the index of the first row | |
j | the index of the second row |
Definition at line 355 of file deprecated_matrix.h.
Matrix vcg::ndim::Matrix< TYPE >::transpose | ( | ) | [inline] |
Definition at line 722 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::Transpose | ( | ) | [inline] |
Matrix transposition operation: set the current matrix to its transpose
Definition at line 708 of file deprecated_matrix.h.
void vcg::ndim::Matrix< TYPE >::transposeInPlace | ( | ) | [inline] |
Definition at line 728 of file deprecated_matrix.h.
unsigned int vcg::ndim::Matrix< TYPE >::_columns [protected] |
the number of matrix rows
Definition at line 753 of file deprecated_matrix.h.
ScalarType* vcg::ndim::Matrix< TYPE >::_data [protected] |
the matrix elements
Definition at line 756 of file deprecated_matrix.h.
unsigned int vcg::ndim::Matrix< TYPE >::_rows [protected] |
the number of matrix rows
Definition at line 746 of file deprecated_matrix.h.