Changeset 101
- Timestamp:
- 05/12/08 14:37:44 (17 years ago)
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/math/chmat.h
r98 r101 32 32 33 33 void opupdt ( const vec &v, double w ); 34 mat to_mat();34 inline 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 vec sqrt_mult ( const vec &v ) const;41 double qform ( const vec &v ) const;42 double invqform ( const vec &v ) const;43 void clear();40 inline vec sqrt_mult ( const vec &v ) const; 41 inline double qform ( const vec &v ) const; 42 inline double invqform ( const vec &v ) const; 43 inline void clear(); 44 44 //! add another chmat \c A2 with weight \c w. 45 45 void add ( const chmat &A2, double w=1.0 ) {}; -
bdm/math/libDC.cpp
r98 r101 121 121 mat U = ltuinv( L ); 122 122 123 //Fixme can be done more efficiently either via dydr or ldform 124 for ( int r = 0; r < dim; r++ ) { 125 // Add columns of U as dyads weighted by 1/D 126 Inv.opupdt( U.get_col( r ), 1.0 / D( r ) ); 127 } 123 Inv.ldform( U.transpose(), 1.0 / D ); 128 124 } 129 125 -
tests/test0.cpp
r37 r101 38 38 ld.inv(Il); // 39 39 mat I = Il.to_mat()*ld.to_mat(); 40 cout << "ld:"<<Il.to_mat() << "eye:"<< I <<endl; 40 cout << "ld:" << endl << Il.to_mat() << "eye:" << endl<< I <<endl; 41 getchar(); 41 42 42 43 cout << "Test ldform()"<<endl;