ldmat sqmat libDC.h vec vec ldmat::D D Positive vector $D$. add clear inv invqform ldform ldmat logdet mult_sym mult_sym_t operator*= opupdt qform sqrt_mult to_mat mat mat ldmat::L L Lower-triangular matrix $L$. add clear inv invqform ldform ldmat ltuinv mult_sym mult_sym_t opupdt qform sqrt_mult to_mat ldmat::ldmat (const mat &L, const vec &D) ldmat const mat & L const vec & D Construct by copy of L and D. D L ldmat::ldmat (const mat &V) ldmat const mat & V Construct by decomposition of full matrix V. sqmat::dim ldform ldmat::ldmat (vec D0) ldmat vec D0 Construct diagonal matrix with diagonal D0. D sqmat::dim L ldmat::ldmat () ldmat Default constructor. ldmat::ldmat (const int dim0) ldmat const int dim0 Default initialization with proper size. virtual ldmat::~ldmat () ~ldmat Destructor for future use;. void void ldmat::opupdt (const vec &v, double w) opupdt opupdt const vec & v double w 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 BLAS-2b operation. D sqmat::dim L add ARX::bayes mat mat ldmat::to_mat () to_mat to_mat Conversion to full matrix. D sqmat::dim L ARX::get_parameters void void ldmat::mult_sym (const mat &C) mult_sym mult_sym const mat & C Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$. C multiplying matrix, D L ldform void void ldmat::mult_sym_t (const mat &C) mult_sym_t mult_sym_t const mat & C Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C'*V*C$. C multiplying matrix, D L ldform void void ldmat::add (const ldmat &ld2, double w=1.0) add const ldmat & ld2 double w 1.0 Add another matrix in LD form with weight w. D sqmat::dim L opupdt double double ldmat::logdet () const logdet logdet Logarithm of a determinant. D egiw::lognc double double ldmat::qform (const vec &v) const qform qform const vec & v Evaluates quadratic form $x= v'*V*v$;. D L egiw::evalpdflog double double ldmat::invqform (const vec &v) const invqform invqform const vec & v Evaluates quadratic form $x= v'*inv(V)*v$;. D L void void ldmat::clear () clear clear Clearing matrix so that it corresponds to zeros. D L inv int int ldmat::cols () const cols cols access function sqmat::dim int int ldmat::rows () const rows rows access function sqmat::dim egiw::egiw vec vec ldmat::sqrt_mult (const vec &v) const sqrt_mult sqrt_mult const vec & v Multiplies square root of $V$ by vector $x$. Used e.g. in generating normal samples. D sqmat::dim L void void ldmat::inv (ldmat &Inv) const inv ldmat & Inv Matrix inversion preserving the chosen form. Inv a space where the inverse is stored. clear D L ldform void void ldmat::mult_sym (const mat &C, ldmat &U) const mult_sym const mat & C ldmat & U Symmetric multiplication of $U$ by a general matrix $C$, result of which is stored in the current class. C matrix to multiply with U a space where the inverse is stored. D L ldform void void ldmat::mult_sym_t (const mat &C, ldmat &U) const mult_sym_t const mat & C ldmat & U Symmetric multiplication of $U$ by a transpose of a general matrix $C$, result of which is stored in the current class. C matrix to multiply with U a space where the inverse is stored. D L ldform void void ldmat::ldform (const mat &A, const vec &D0) ldform const mat & A const vec & D0 Transforms general $A'D0 A$ into pure $L'DL$. The new decomposition fullfills: $A'*diag(D)*A = self.L'*diag(self.D)*self.L$ A general matrix D0 general vector D sqmat::dim L inv ldmat mult_sym mult_sym_t void void ldmat::setD (const vec &nD) setD const vec & nD Access functions. KFcondR::condition KFcondQR::condition void void ldmat::setD (const vec &nD, int i) setD const vec & nD int i Access functions. void void ldmat::setL (const vec &nL) setL const vec & nL Access functions. const vec & const vec& ldmat::_D () const _D Access functions. egiw::lognc egiw::mean const mat & const mat& ldmat::_L () const _L Access functions. egiw::mean ldmat & ldmat & ldmat::operator+= (const ldmat &ldA) operator+= const ldmat & ldA add another ldmat matrix Operations: mapping of add operation to operators ldmat & ldmat & ldmat::operator-= (const ldmat &ldA) operator-= const ldmat & ldA subtract another ldmat matrix mapping of negative add operation to operators ldmat & ldmat & ldmat::operator*= (double x) operator*= double x multiply by a scalar D friend std::ostream & std::ostream& operator<< (std::ostream &os, const ldmat &sq) operator<< std::ostream & os const ldmat & sq print both L and D int int sqmat::dim dim dimension of the square matrix add cols sqmat::cols ldform ldmat ltuinv opupdt rows sqmat::rows sqrt_mult to_mat Matrix stored in LD form, (typically known as UD). Matrix is decomposed as follows: \[M = L'DL\] where only $L$ and $D$ matrices are stored. All inplace operations modifies only these and the need to compose and decompose the matrix is avoided. ldmat_D ldmat_L ldmatadd ldmatclear ldmatcols ldmatD ldmatdim ldmatinv ldmatinvqform ldmatL ldmatldform ldmatldmat ldmatldmat ldmatldmat ldmatldmat ldmatldmat ldmatlogdet ldmatmult_sym ldmatmult_sym ldmatmult_sym_t ldmatmult_sym_t ldmatoperator*= ldmatoperator+= ldmatoperator-= ldmatoperator<< ldmatopupdt ldmatqform ldmatrows ldmatsetD ldmatsetD ldmatsetL ldmatsqmat ldmatsqrt_mult ldmatto_mat ldmat~ldmat ldmat~sqmat