Changeset 18 for bdm/math

Show
Ignore:
Timestamp:
02/01/08 10:49:29 (16 years ago)
Author:
smidl
Message:

update

Location:
bdm/math
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • bdm/math/Makefile

    r15 r18  
    22 
    33clean: 
    4         rm *.o 
     4        $(RM) *.o 
  • bdm/math/libDC.cpp

    r14 r18  
    3131 
    3232        dim = V.cols(); 
     33        mat F; 
     34        vec D0; 
    3335        it_assert_debug( dim == V.rows(),"ldmat::ldmat matrix V is not square!" ); 
    34  
    3536         
     37        //decompose V in cholesky 
     38        D0 = ones(dim); 
     39         
     40 
     41        using std::cout; 
     42        cout<<V; 
     43        chol(V,F); 
     44        // L and D will be allocated by ldform() 
     45        this->ldform(F,D0);      
    3646} 
    3747 
     
    194204 
    195205        it_assert_debug( A.cols()==dim,"ldmat::ldform A is not compatible" ); 
    196         it_assert_debug( D.length()==A.rows(),"ldmat::ldform Vector D must have the length as row count of A" ); 
     206        it_assert_debug( D0.length()==A.rows(),"ldmat::ldform Vector D must have the length as row count of A" ); 
    197207 
    198208        L=concat_vertical( zeros( n,n ), diag( sqrt( D0 ) )*A ); 
     
    202212         
    203213        vec w=zeros( n ); 
    204         vec v; 
     214        vec v=zeros(n); 
    205215        double sum, beta, pom; 
    206216