Changeset 495 for library/bdm/math

Show
Ignore:
Timestamp:
08/11/09 08:48:56 (15 years ago)
Author:
vbarta
Message:

moved square matrices to namespace bdm

Location:
library/bdm/math
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/math/chmat.cpp

    r477 r495  
    44//using std::endl; 
    55 
     6namespace bdm 
     7{ 
    68 
    79void chmat::opupdt ( const vec &v, double w ) { 
     
    4244                it_warning ( "QR unstable in chmat mult_sym" ); 
    4345        } 
    44 }; 
     46} 
     47 
    4548double chmat::logdet() const { 
    4649        double ldet = 0.0; 
     
    5154        } 
    5255        return 2*ldet; //compensate for Ch being sqrt() 
    53 }; 
     56} 
     57 
    5458//TODO can be done more efficiently using BLAS, see triangular matrices 
    5559vec chmat::sqrt_mult ( const vec &v ) const { 
     
    5761        pom = Ch * v; 
    5862        return pom; 
    59 }; 
     63} 
     64 
    6065double chmat::qform ( const vec &v ) const { 
    6166        vec pom; 
    6267        pom = Ch * v; 
    6368        return pom*pom; 
    64 }; 
     69} 
     70 
    6571double chmat::invqform ( const vec &v ) const { 
    6672        vec pom ( v.length() ); 
    6773        forward_substitution ( Ch.T(), v, pom ); 
    6874        return pom*pom; 
    69 }; 
     75} 
     76 
    7077void chmat::clear() { 
    7178        Ch.clear(); 
    72 }; 
     79} 
     80 
     81} 
  • library/bdm/math/chmat.h

    r477 r495  
    1616 
    1717#include "square_mat.h" 
     18 
     19namespace bdm 
     20{ 
    1821 
    1922/*! \brief Symmetric matrix stored in square root decomposition using upper cholesky 
     
    133136} 
    134137 
     138} 
     139 
    135140#endif // CHMAT_H 
  • library/bdm/math/square_mat.cpp

    r477 r495  
    11 
    22#include "square_mat.h" 
     3 
     4namespace bdm 
     5{ 
    36 
    47using namespace itpp; 
     
    401404        } 
    402405} 
     406 
     407} 
  • library/bdm/math/square_mat.h

    r477 r495  
    1616 
    1717#include "../itpp_ext.h" 
     18 
     19namespace bdm 
     20{ 
    1821 
    1922using namespace itpp; 
     
    329332} 
    330333 
     334} 
     335 
    331336#endif // DC_H