Changeset 24 for bdm/math

Show
Ignore:
Timestamp:
02/19/08 13:48:02 (16 years ago)
Author:
smidl
Message:

drobnosti v DC

Location:
bdm/math
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • bdm/math/libDC.cpp

    r22 r24  
    186186} 
    187187 
    188 double ldmat::qform( vec &v ) { 
     188double ldmat::qform( const vec &v ) { 
    189189        double x = 0.0, sum; 
    190190        int i,j; 
     
    204204} 
    205205 
    206 vec ldmat::sqrt_mult( vec &x ) { 
     206vec ldmat::sqrt_mult( const vec &x ) { 
    207207        int i,j; 
    208208        vec res( dim ); 
  • bdm/math/libDC.h

    r22 r24  
    5757                Used e.g. in generating normal samples. 
    5858                */ 
    59                 virtual vec sqrt_mult ( vec &v ) =0; 
     59                virtual vec sqrt_mult (const vec &v ) =0; 
    6060 
    6161                /*! 
     
    6363 
    6464                */ 
    65                 virtual double qform ( vec &v ) =0; 
     65                virtual double qform (const vec &v ) =0; 
    6666 
    6767//      //! easy version of the 
     
    110110 
    111111                double logdet() {return log ( det ( M ) );}; 
    112                 double qform ( vec &v ) {return ( v* ( M*v ) );}; 
    113                 vec sqrt_mult ( vec &v ) {it_error ( "not implemented" );return v;}; 
     112                double qform (const vec &v ) {return ( v* ( M*v ) );}; 
     113                vec sqrt_mult (const vec &v ) {it_error ( "not implemented" );return v;}; 
    114114 
    115115                fsqmat& operator += ( const fsqmat &A ) {M+=A.M;return *this;}; 
     
    138138                void add ( const ldmat &ld2, double w=1.0 ); 
    139139                double logdet(); 
    140                 double qform ( vec &v ); 
     140                double qform (const vec &v ); 
    141141//      sqmat& operator -= ( const sqmat & ld2 ); 
    142142                void clear(); 
    143143                int cols(); 
    144144                int rows(); 
    145                 vec sqrt_mult ( vec &v ); 
     145                vec sqrt_mult ( const vec &v ); 
    146146 
    147147                /*! \brief Matrix inversion preserving the chosen form.