Changeset 18 for bdm/math/libDC.cpp
- Timestamp:
- 02/01/08 10:49:29 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/math/libDC.cpp
r14 r18 31 31 32 32 dim = V.cols(); 33 mat F; 34 vec D0; 33 35 it_assert_debug( dim == V.rows(),"ldmat::ldmat matrix V is not square!" ); 34 35 36 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); 36 46 } 37 47 … … 194 204 195 205 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" ); 197 207 198 208 L=concat_vertical( zeros( n,n ), diag( sqrt( D0 ) )*A ); … … 202 212 203 213 vec w=zeros( n ); 204 vec v ;214 vec v=zeros(n); 205 215 double sum, beta, pom; 206 216