- Main Page
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# fsqmat Class Reference

Fake sqmat. This class maps sqmat operations to operations on full matrix. More...

`#include <libDC.h>`

Inheritance diagram for fsqmat:

[legend]
Collaboration diagram for fsqmat:

[legend]

List of all members.

## Public Member Functions
void | opupdt (const vec &v, double w)
mat | to_mat ()
| Conversion to full matrix.
void | mult_sym (const mat &C)
| Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$.
void | mult_sym_t (const mat &C)
| Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C'*V*C$.
void | mult_sym (const mat &C, fsqmat &U) const
| store result of `mult_sym` in external matrix $U$
void | mult_sym_t (const mat &C, fsqmat &U) const
| store result of `mult_sym_t` in external matrix $U$
void | clear ()
| Clearing matrix so that it corresponds to zeros.
| fsqmat ()
| Default initialization.
| fsqmat (const int dim0)
| Default initialization with proper size.
| fsqmat (const mat &M)
| Constructor.
virtual | ~fsqmat ()
| Destructor for future use;.
virtual void | inv (fsqmat &Inv)
| Matrix inversion preserving the chosen form.
double | logdet () const
| Logarithm of a determinant.
double | qform (const vec &v) const
| Evaluates quadratic form $x= v'*V*v$;.
vec | sqrt_mult (const vec &v) const
| Multiplies square root of $V$ by vector $x$.
fsqmat & | operator+= (const fsqmat &A)
| add another fsqmat matrix
fsqmat & | operator-= (const fsqmat &A)
| subtrack another fsqmat matrix
fsqmat & | operator *= (double x)
| multiply by a scalar
int | cols () const
| Reimplementing common functions of mat: cols().
int | rows () const
| Reimplementing common functions of mat: cols().
## Protected Attributes
mat | M
| Full matrix on which the operations are performed.
int | dim
| dimension of the square matrix
## Friends
std::ostream & | operator<< (std::ostream &os, const fsqmat &sq)
| print full matrix

## Detailed Description

Fake sqmat. This class maps sqmat operations to operations on full matrix.

This class can be used to compare performance of algorithms using decomposed matrices with perormance of the same algorithms using full matrices;

## Member Function Documentation

void fsqmat::opupdt | ( | const vec & | v,
|  | double | w |
| ) |  |  | `[virtual]`

Perfroms a rank-1 update by outer product of vectors: $V = V + w v v'$.

Parameters:

  | v | Vector forming the outer product to be added
  | w | weight of updating; can be negative

BLAS-2b operation.

Implements sqmat.

void fsqmat::mult_sym | ( | const mat & | C | ) | `[virtual]`

Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$.

Parameters:

  | C | multiplying matrix,

Implements sqmat.

void fsqmat::mult_sym_t | ( | const mat & | C | ) | `[virtual]`

Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C'*V*C$.

Parameters:

  | C | multiplying matrix,

Implements sqmat.

void fsqmat::inv | ( | fsqmat & | Inv | ) | `[virtual]`

Matrix inversion preserving the chosen form.

Parameters:

  | Inv | a space where the inverse is stored.

vec fsqmat::sqrt_mult | ( | const vec & | v | ) | const`[inline, virtual]`

Multiplies square root of $V$ by vector $x$.

Used e.g. in generating normal samples.

Implements sqmat.

The documentation for this class was generated from the following files:

- work/mixpp/bdm/math/libDC.h
- work/mixpp/bdm/math/libDC.cpp