# chmat Class Reference

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

`#include <chmat.h>`

Inheritance diagram for chmat:

[legend]
Collaboration diagram for chmat:

[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 , 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).
mat & | _Ch ()
| Access function.
void | setD (const vec &nD)
| 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
int | cols () const
| Reimplementing common functions of mat: cols().
int | rows () const
| Reimplementing common functions of mat: cols().
## 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::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.

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

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

Parameters:

  | C | multiplying matrix,

Implements sqmat.

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.

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

Multiplies square root of by vector .

Used e.g. in generating normal samples.

Implements sqmat.

References Ch.

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

Operators.

Operations: mapping of add operation to operators

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

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