yat
0.20.3pre
|
#include <yat/utility/DiagonalMatrix.h>
Public Member Functions | |
DiagonalMatrix (void) | |
Default constructor. | |
DiagonalMatrix (size_t row, size_t column, double x=0.0) | |
DiagonalMatrix (const VectorBase &diagonal) | |
DiagonalMatrix (const MatrixBase &m) | |
size_t | rows (void) const |
size_t | columns (void) const |
const double | operator() (size_t row, size_t col) const |
double & | operator() (size_t i) |
DiagonalMatrix & | operator*= (const DiagonalMatrix &rhs) |
Multiplication and assign operator. More... | |
DiagonalMatrix & | operator+= (const DiagonalMatrix &rhs) |
Add and assign operator. More... | |
DiagonalMatrix & | operator-= (const DiagonalMatrix &rhs) |
Subtract and assign operator. More... | |
Related Functions | |
(Note that these are not member functions.) | |
DiagonalMatrix | operator* (const DiagonalMatrix &lhs, const DiagonalMatrix &rhs) |
template<class T > | |
expression::DiagonalMatrixMatrix< T > | operator* (const DiagonalMatrix &lhs, const BasicMatrix< T > &rhs) |
matrix matrix multiplication More... | |
template<class T > | |
expression::MatrixDiagonalMatrix< T > | operator* (const BasicMatrix< T > &lhs, const DiagonalMatrix &rhs) |
matrix matrix multiplication More... | |
DiagonalMatrix | operator+ (const DiagonalMatrix &lhs, const DiagonalMatrix &rhs) |
matrix matrix addition More... | |
template<class T > | |
expression::DiagonalMatrix< DiagonalMatrix, BasicMatrix< T >, expression::Plus > | operator+ (const DiagonalMatrix &lhs, const BasicMatrix< T > &rhs) |
matrix matrix addition More... | |
template<class T > | |
expression::DiagonalMatrix< BasicMatrix< T >, DiagonalMatrix, expression::Plus > | operator+ (const BasicMatrix< T > &lhs, const DiagonalMatrix &rhs) |
matrix matrix addition More... | |
DiagonalMatrix | operator- (const DiagonalMatrix &lhs, const DiagonalMatrix &rhs) |
matrix matrix subtraction More... | |
template<class T > | |
expression::DiagonalMatrix< DiagonalMatrix, BasicMatrix< T >, expression::Minus > | operator- (const DiagonalMatrix &lhs, const BasicMatrix< T > &rhs) |
matrix matrix subtraction More... | |
template<class T > | |
expression::DiagonalMatrix< BasicMatrix< T >, DiagonalMatrix, expression::Minus > | operator- (const BasicMatrix< T > &lhs, const DiagonalMatrix &rhs) |
matrix matrix subtraction More... | |
template<class T > | |
expression::DiagonalMatrixVector< T > | operator* (const DiagonalMatrix &lhs, const BasicVector< T > &rhs) |
matrix vector multiplication More... | |
template<class T > | |
expression::DiagonalMatrixVector< T > | operator* (const BasicVector< T > &lhs, const DiagonalMatrix &rhs) |
vector matrix multiplication More... | |
Diagonal Matrix.
All off-diagonal elements are zero by definition, which can be used to speed up some calculation.
theplu::yat::utility::DiagonalMatrix::DiagonalMatrix | ( | size_t | row, |
size_t | column, | ||
double | x = 0.0 |
||
) |
Construct a row x column Matrix with all elements set to x
|
explicit |
Construct a square matrix in which diagonal is set to diagonal
|
explicit |
Construct a diagonal matrix from m. All non-diagonal elements are set to zero.
size_t theplu::yat::utility::DiagonalMatrix::columns | ( | void | ) | const |
const double theplu::yat::utility::DiagonalMatrix::operator() | ( | size_t | row, |
size_t | col | ||
) | const |
access element at row row and column column
double& theplu::yat::utility::DiagonalMatrix::operator() | ( | size_t | i | ) |
access element at row i and column i
Elements outside diagnonal are only accessible as const
DiagonalMatrix& theplu::yat::utility::DiagonalMatrix::operator*= | ( | const DiagonalMatrix & | rhs | ) |
Multiplication and assign operator.
Same as doing *this = *this * rhs.
DiagonalMatrix& theplu::yat::utility::DiagonalMatrix::operator+= | ( | const DiagonalMatrix & | rhs | ) |
Add and assign operator.
Elementwise addition of the diagnonal elements.
DiagonalMatrix& theplu::yat::utility::DiagonalMatrix::operator-= | ( | const DiagonalMatrix & | rhs | ) |
Subtract and assign operator.
Elementwise addition of the diagnonal elements.
size_t theplu::yat::utility::DiagonalMatrix::rows | ( | void | ) | const |
|
related |
Multiplication of two diagonal matrices
Diagonal elements are calculated as lhs(i,i) * rhs(i,i)
|
related |
matrix matrix multiplication
|
related |
matrix matrix multiplication
|
related |
matrix vector multiplication
|
related |
vector matrix multiplication
|
related |
matrix matrix addition
|
related |
matrix matrix addition
|
related |
matrix matrix addition
|
related |
matrix matrix subtraction
|
related |
matrix matrix subtraction
|
related |
matrix matrix subtraction