Changeset 101

Show
Ignore:
Timestamp:
05/12/08 14:37:44 (16 years ago)
Author:
mido
Message:

drobny update LDcek - vse je nyni prinejhorsim tak, jako v Matlabu, z nej uz tedy pro LD nic nevzejde; doplneni chybejicich slov INLINE do prislusneho headru

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • bdm/math/chmat.h

    r98 r101  
    3232 
    3333        void opupdt ( const vec &v, double w ); 
    34         mat to_mat(); 
     34        inline mat to_mat(); 
    3535        void mult_sym ( const mat &C ); 
    3636        void mult_sym ( const mat &C , chmat &U ) const; 
     
    3838        void mult_sym_t ( const mat &C, chmat &U ) const; 
    3939        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(); 
    4444        //! add another chmat \c A2 with weight \c w. 
    4545        void add ( const chmat &A2, double w=1.0 ) {}; 
  • bdm/math/libDC.cpp

    r98 r101  
    121121        mat U = ltuinv( L ); 
    122122 
    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 ); 
    128124} 
    129125 
  • tests/test0.cpp

    r37 r101  
    3838        ld.inv(Il); //  
    3939        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(); 
    4142 
    4243        cout << "Test ldform()"<<endl;