work/mixpp/bdm/math/chmat.h

Go to the documentation of this file.
00001 
00013 #ifndef CHMAT_H
00014 #define CHMAT_H
00015 
00016 #include <itpp/itbase.h>
00017 #include "libDC.h"
00018 
00019 using namespace itpp;
00020 
00026 class chmat : public sqmat {
00027 protected:
00029         mat Ch;
00030 public:
00031 
00032         virtual void opupdt ( const vec &v, double w );
00033         virtual mat to_mat();
00034         virtual void mult_sym ( const mat &C );
00035         virtual void mult_sym_t ( const mat &C );
00036         virtual double logdet() const;
00037         virtual vec sqrt_mult ( const vec &v ) const;
00038         virtual double qform ( const vec &v ) const;
00039         virtual void clear();
00040         //extra defs
00041         virtual void inv ( mat &Inv );
00042         virtual void inv ( chmat &Inv );
00043 
00045         virtual ~chmat() {};
00047         chmat ( const int dim0 ) : sqmat ( dim0 ),Ch ( dim0,dim0 ) {};
00049         chmat ( const mat &M ) : sqmat ( M.rows() ),Ch ( M.rows(),M.cols() ) {
00050                 mat Q;
00051                 it_assert_debug ( M.rows() ==M.cols(),"chmat:: input matrix must be square!" );
00052                 Ch=chol ( M );
00053         };
00055         mat & _Ch(){return Ch;}
00056 };
00057 
00058 /*
00059 
00062 inline chmat& chmat::operator += ( const chmat &ldA )  {this->add ( ldA );return *this;}
00064 inline chmat& chmat::operator -= ( const chmat &ldA )  {this->add ( ldA,-1.0 );return *this;}
00065 */
00066 #endif // CHMAT_H

Generated on Wed Mar 12 16:15:44 2008 for mixpp by  doxygen 1.5.3