chmat Class Reference

#include <chmat.h>

Inheritance diagram for chmat:

sqmat

List of all members.


Detailed Description

Symmetric matrix stored in square root decomposition using upper cholesky.

This matrix represent $A=Ch' Ch$ where only the upper triangle $Ch$ is stored;

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 $C$, i.e. $V = C*V*C'$.
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 $C$, i.e. $V = C'*V*C$.
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 $V$ by vector $x$.
double qform (const vec &v) const
 Evaluates quadratic form $x= v'*V*v$;.
double invqform (const vec &v) const
 Evaluates quadratic form $x= v'*inv(V)*v$;.
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.
void setD (const vec &nD)
 Access functions.
void setD (const vec &nD, int i)
 Access functions.
chmatoperator+= (const chmat &A2)
 Operators.
chmatoperator-= (const chmat &A2)
 mapping of negative add operation to operators
chmatoperator* (const chmat &A2)
chmatoperator* (const double &d)
chmatoperator= (const chmat &A2)
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


Member Function Documentation

void chmat::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.

References Ch.

void chmat::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 chmat::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.

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

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

Used e.g. in generating normal samples.

Implements sqmat.

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:

Generated on Wed Feb 18 17:38:50 2009 for mixpp by  doxygen 1.5.6