Changeset 565 for library/bdm/math/chmat.cpp
- Timestamp:
- 08/19/09 16:54:24 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/math/chmat.cpp
r495 r565 16 16 qr ( Z, R ); 17 17 Ch = R ( 0, Ch.rows() - 1, 0, Ch.cols() - 1 ); 18 }; 18 } 19 19 20 mat chmat::to_mat() const { 20 21 mat F = Ch.T() * Ch; 21 22 return F; 22 }; 23 } 24 23 25 void chmat::mult_sym ( const mat &C ) { 24 it_assert_debug ( C.rows() == dim, "Wrong dimension of U" );26 bdm_assert_debug ( C.rows() == dim, "Wrong dimension of U" ); 25 27 if ( !qr ( Ch*C.T(), Ch ) ) { 26 it_warning ( "QR unstable in chmat mult_sym" );28 bdm_warning ( "QR unstable in chmat mult_sym" ); 27 29 } 28 }; 30 } 31 29 32 void chmat::mult_sym ( const mat &C , chmat &U ) const { 30 it_assert_debug ( C.rows() == U.dim, "Wrong dimension of U" );33 bdm_assert_debug ( C.rows() == U.dim, "Wrong dimension of U" ); 31 34 if ( !qr ( Ch*C.T(), U.Ch ) ) { 32 it_warning ( "QR unstable in chmat mult_sym" );35 bdm_warning ( "QR unstable in chmat mult_sym" ); 33 36 } 34 }; 37 } 38 35 39 void chmat::mult_sym_t ( const mat &C ) { 36 it_assert_debug ( C.cols() == dim, "Wrong dimension of U" );40 bdm_assert_debug ( C.cols() == dim, "Wrong dimension of U" ); 37 41 if ( !qr ( Ch*C, Ch ) ) { 38 it_warning ( "QR unstable in chmat mult_sym" );42 bdm_warning ( "QR unstable in chmat mult_sym" ); 39 43 } 40 }; 44 } 45 41 46 void chmat::mult_sym_t ( const mat &C, chmat &U ) const { 42 it_assert_debug ( C.cols() == U.dim, "Wrong dimension of U" );47 bdm_assert_debug ( C.cols() == U.dim, "Wrong dimension of U" ); 43 48 if ( !qr ( Ch*C, U.Ch ) ) { 44 it_warning ( "QR unstable in chmat mult_sym" );49 bdm_warning ( "QR unstable in chmat mult_sym" ); 45 50 } 46 51 }