# chmat Class Reference

Symmetric matrix stored in square root decomposition using upper cholesky. More...

`#include <chmat.h>`

List of all members.

## Public Member Functions
void | opupdt (const vec &v, double w)
mat | to_mat () const
| Conversion to full matrix.
void | mult_sym (const mat &C)
| Inplace symmetric multiplication by a SQUARE matrix , i.e. .
void | mult_sym (const mat &C, chmat &U) const
void | mult_sym_t (const mat &C)
| Inplace symmetric multiplication by a SQUARE transpose of matrix , i.e. .
void | mult_sym_t (const mat &C, chmat &U) const
double | logdet () const
| Logarithm of a determinant.
vec | sqrt_mult (const vec &v) const
| Multiplies square root of by vector .
double | qform (const vec &v) const
| Evaluates quadratic form ;.
double | invqform (const vec &v) const
| Evaluates quadratic form ;.
void | clear ()
| Clearing matrix so that it corresponds to zeros.
void | add (const chmat &A2, double w=1.0)
| add another chmat `A2` with weight `w`.
void | inv (chmat &Inv) const
| Inversion in the same form, i.e. cholesky.
virtual | ~chmat ()
| Destructor for future use;.
| chmat (const int dim0)
| Default constructor.
| chmat (const vec &v)
| Default constructor.
| chmat (const chmat &Ch0)
| Copy constructor.
| chmat (const mat &M)
| Default constructor (m3k:cholform).
| chmat (const chmat &M, const ivec &perm)
| Constructor.
mat & | _Ch ()
| Access function.
const mat & | _Ch () const
| Access function.
void | setD (const vec &nD)
| Access functions.
void | setCh (const vec &chQ)
| Access functions.
void | setD (const vec &nD, int i)
| Access functions.
chmat & | operator+= (const chmat &A2)
| Operators.
chmat & | operator-= (const chmat &A2)
| mapping of negative add operation to operators
chmat & | operator* (const double &d)
chmat & | operator= (const chmat &A2)
chmat & | operator*= (double x)
int | cols () const
| Reimplementing common functions of mat: cols().
int | rows () const
| Reimplementing common functions of mat: rows().
## Protected Attributes
mat | Ch
| Upper triangle of the cholesky matrix.
int | dim
| dimension of the square matrix

## Detailed Description

Symmetric matrix stored in square root decomposition using upper cholesky.

This matrix represent where only the upper triangle is stored;

## Member Function Documentation

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

Inplace symmetric multiplication by a SQUARE matrix , i.e. .

Parameters:

  | C | multiplying matrix,

Implements sqmat.

References Ch, and sqmat::dim.

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

Inplace symmetric multiplication by a SQUARE transpose of matrix , i.e. .

Parameters:

  | C | multiplying matrix,

Implements sqmat.

References Ch, and sqmat::dim.

chmat & chmat::operator+= | ( | const chmat & | A2 | ) | `[inline]`

Operators.

Operations: mapping of add operation to operators

References add().

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

Perfroms a rank-1 update by outer product of vectors: .

Parameters:

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

BLAS-2b operation.

Implements sqmat.

References Ch.

vec chmat::sqrt_mult | ( | const vec & | v | ) | const`[virtual]`

Multiplies square root of by vector .

Used e.g. in generating normal samples.

Implements sqmat.

References Ch.

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

- chmat.h
- chmat.cpp