bdm::ldmat Class Reference
Matrix stored in LD form, (commonly known as UD). More...
#include <square_mat.h>
Inheritance diagram for bdm::ldmat:
Public Member Functions | |
ldmat (const mat &L, const vec &D) | |
Construct by copy of L and D. | |
ldmat (const mat &V) | |
Construct by decomposition of full matrix V. | |
ldmat (const ldmat &V0, const ivec &perm) | |
Construct by restructuring of V0 accordint to permutation vector perm. | |
ldmat (vec D0) | |
Construct diagonal matrix with diagonal D0. | |
ldmat () | |
Default constructor. | |
ldmat (const int dim0) | |
Default initialization with proper size. | |
virtual | ~ldmat () |
Destructor for future use;. | |
void | opupdt (const vec &v, double w) |
mat | to_mat () const |
void | mult_sym (const mat &C) |
void | mult_sym_t (const mat &C) |
void | add (const ldmat &ld2, double w=1.0) |
Add another matrix in LD form with weight w. | |
double | logdet () const |
double | qform (const vec &v) const |
double | invqform (const vec &v) const |
void | clear () |
vec | sqrt_mult (const vec &v) const |
void | inv (ldmat &Inv) const |
Matrix inversion preserving the chosen form. | |
void | mult_sym (const mat &C, ldmat &U) const |
Symmetric multiplication of by a general matrix , result of which is stored in the current class. | |
void | mult_sym_t (const mat &C, ldmat &U) const |
Symmetric multiplication of by a transpose of a general matrix , result of which is stored in the current class. | |
void | ldform (const mat &A, const vec &D0) |
Transforms general into pure . | |
void | setD (const vec &nD) |
Access functions. | |
void | setD (const vec &nD, int i) |
Access functions. | |
void | setL (const vec &nL) |
Access functions. | |
const vec & | _D () const |
Access functions. | |
const mat & | _L () const |
Access functions. | |
vec & | __D () |
Access functions. | |
mat & | __L () |
Access functions. | |
void | validate () |
ldmat & | operator+= (const ldmat &ldA) |
add another ldmat matrix | |
ldmat & | operator-= (const ldmat &ldA) |
mapping of negative add operation to operators | |
ldmat & | operator *= (double x) |
multiply by a scalar | |
Protected Attributes | |
vec | D |
Positive vector . | |
mat | L |
Lower-triangular matrix . | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const ldmat &sq) |
print both L and D |
Detailed Description
Matrix stored in LD form, (commonly known as UD).Matrix is decomposed as follows:
where only and matrices are stored. All inplace operations modifies only these and the need to compose and decompose the matrix is avoided.
Member Function Documentation
void bdm::ldmat::inv | ( | ldmat & | Inv | ) | const |
Matrix inversion preserving the chosen form.
- Parameters:
-
Inv a space where the inverse is stored.
void bdm::ldmat::ldform | ( | const mat & | A, | |
const vec & | D0 | |||
) |
Transforms general into pure .
The new decomposition fullfills:
- Parameters:
-
A general matrix D0 general vector
void bdm::ldmat::mult_sym | ( | const mat & | C, | |
ldmat & | U | |||
) | const |
Symmetric multiplication of by a general matrix , result of which is stored in the current class.
- Parameters:
-
C matrix to multiply with U a space where the inverse is stored.
void bdm::ldmat::mult_sym_t | ( | const mat & | C, | |
ldmat & | U | |||
) | const |
Symmetric multiplication of by a transpose of a general matrix , result of which is stored in the current class.
- Parameters:
-
C matrix to multiply with U a space where the inverse is stored.
add another ldmat matrix
Operations: mapping of add operation to operators
The documentation for this class was generated from the following files:
- square_mat.h
- square_mat.cpp
Generated on 2 Dec 2013 for mixpp by 1.4.7