TooN
|
A diagonal matrix. More...
#include <diagmatrix.h>
Public Member Functions | |
Precision & | operator[] (int i) |
Index the leading elements on the diagonal. | |
const Precision & | operator[] (int i) const |
Index the leading elements on the diagonal. | |
Vector< Size, Precision, Base >::as_slice_type | diagonal_slice () |
Return the leading diagonal as a vector. | |
const Vector< Size, Precision, Base >::as_slice_type | diagonal_slice () const |
Return the leading diagonal as a vector. | |
DiagonalMatrix< Size, Precision > | operator- () const |
DiagonalMatrix< Size, Precision > | inverse () const |
Constructors | |
DiagonalMatrix () | |
DiagonalMatrix (int size_in) | |
DiagonalMatrix (Precision *data) | |
DiagonalMatrix (Precision *data, int size_in) | |
DiagonalMatrix (Precision *data_in, int size_in, int stride_in, Internal::Slicing) | |
template<class Op > | |
DiagonalMatrix (const Operator< Op > &op) | |
my_vector constructed from a TooN::Operator | |
template<int Size2, typename Precision2 , typename Base2 > | |
DiagonalMatrix (const Vector< Size2, Precision2, Base2 > &from) | |
![]() | |
Operator () | |
Operator (int size_in) | |
Operator (Precision *data) | |
Operator (Precision *data, int size_in) | |
Operator (Precision *data_in, int size_in, int stride_in, Internal::Slicing) | |
template<class Op > | |
Operator (const Operator< Op > &op) | |
my_vector constructed from a TooN::Operator | |
template<int Size2, typename Precision2 , typename Base2 > | |
Operator (const Vector< Size2, Precision2, Base2 > &from) | |
template<int R, int C, class P , class B > | |
void | eval (Matrix< R, C, P, B > &m) const |
Additional Inherited Members | |
![]() | |
Vector< Size, Precision, Base > | my_vector |
The vector used to hold the leading diagonal. | |
A diagonal matrix.
Support is limited but diagonal matrices can be multiplied by vectors, matrices or diagonal matrices on either side.
Diagonal matrices can be created from vectors by using the as_diagonal()
member function:
A vector can be obtained from the diagonal matrix by using the diagonal_slice()
member function.