Legend:
- Unmodified
- Added
- Removed
-
bdm/math/chmat.cpp
r76 r108 17 17 Ch = R ( 0, Ch.rows()-1, 0, Ch.cols()-1 ); 18 18 }; 19 inlinemat chmat::to_mat() {mat F=Ch.T() *Ch;return F;};19 mat chmat::to_mat() {mat F=Ch.T() *Ch;return F;}; 20 20 void chmat::mult_sym ( const mat &C ) { 21 21 it_error ( "not implemented" ); … … 37 37 }; 38 38 //TODO can be done more efficiently using BLAS, see triangular matrices 39 inlinevec chmat::sqrt_mult ( const vec &v ) const {vec pom; pom = Ch*v; return pom;};40 inlinedouble chmat::qform ( const vec &v ) const {vec pom; pom = Ch*v; return pom*pom;};41 inlinedouble chmat::invqform ( const vec &v ) const {39 vec chmat::sqrt_mult ( const vec &v ) const {vec pom; pom = Ch*v; return pom;}; 40 double chmat::qform ( const vec &v ) const {vec pom; pom = Ch*v; return pom*pom;}; 41 double chmat::invqform ( const vec &v ) const { 42 42 vec pom(v.length()); 43 43 forward_substitution(Ch.T(),v,pom); 44 44 return pom*pom; 45 45 }; 46 inlinevoid chmat::clear() {Ch.clear();};46 void chmat::clear() {Ch.clear();}; -
bdm/math/chmat.h
r101 r108 32 32 33 33 void opupdt ( const vec &v, double w ); 34 inlinemat to_mat();34 mat to_mat(); 35 35 void mult_sym ( const mat &C ); 36 36 void mult_sym ( const mat &C , chmat &U ) const; … … 38 38 void mult_sym_t ( const mat &C, chmat &U ) const; 39 39 double logdet() const; 40 inlinevec sqrt_mult ( const vec &v ) const;41 inlinedouble qform ( const vec &v ) const;42 inlinedouble invqform ( const vec &v ) const;43 inlinevoid clear();40 vec sqrt_mult ( const vec &v ) const; 41 double qform ( const vec &v ) const; 42 double invqform ( const vec &v ) const; 43 void clear(); 44 44 //! add another chmat \c A2 with weight \c w. 45 45 void add ( const chmat &A2, double w=1.0 ) {};