#include <libDC.h>
Public Member Functions | |
void | opupdt (const vec &v, double w) |
mat | to_mat () |
Conversion to full matrix. | |
void | mult_sym (const mat &C, bool trans=false) |
Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$. | |
void | mult_sym (const mat &C, fsqmat &U, bool trans=false) |
void | inv (fsqmat &Inv) |
void | clear () |
Clearing matrix so that it corresponds to zeros. | |
fsqmat (const mat &M) | |
Constructor. | |
virtual void | inv (fsqmat *Inv) |
Matrix inversion preserving the chosen form. | |
double | logdet () |
Logarithm of a determinant. | |
double | qform (vec &v) |
Evaluates quadratic form $x= v'*V*v$;. | |
vec | sqrt_mult (vec &v) |
Multiplies square root of $V$ by vector $x$. | |
fsqmat & | operator+= (const fsqmat &A) |
fsqmat & | operator-= (const fsqmat &A) |
fsqmat & | operator *= (double x) |
Protected Attributes | |
mat | M |
This class can be used to compare performance of algorithms using decomposed matrices with perormance of the same algorithms using full matrices;
void fsqmat::opupdt | ( | const vec & | v, | |
double | w | |||
) | [virtual] |
Perfroms a rank-1 update by outer product of vectors: $V = V + w v v'$.
v | Vector forming the outer product to be added | |
w | weight of updating; can be negative |
Implements sqmat.
void fsqmat::mult_sym | ( | const mat & | C, | |
bool | trans = false | |||
) | [virtual] |
Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$.
C | multiplying matrix, | |
trans | if true, product $V = C'*V*C$ will be computed instead; |
Implements sqmat.
virtual void fsqmat::inv | ( | fsqmat * | Inv | ) | [virtual] |
Matrix inversion preserving the chosen form.
Inv | a space where the inverse is stored. |
vec fsqmat::sqrt_mult | ( | vec & | v | ) | [inline, virtual] |
Multiplies square root of $V$ by vector $x$.
Used e.g. in generating normal samples.
Implements sqmat.