Legend:
- Unmodified
- Added
- Removed
-
libDC.cpp
r7 r8 115 115 } 116 116 117 void ldmat::mult_ qform( const mat &C, bool trans ) {117 void ldmat::mult_sym( const mat &C, bool trans ) { 118 118 119 119 //TODO better 120 120 121 it_assert_debug( C.cols()==L.cols(), "ldmat::mult_ qform wrong input argument" );121 it_assert_debug( C.cols()==L.cols(), "ldmat::mult_sym wrong input argument" ); 122 122 mat Ct=C; 123 123 … … 128 128 Ct = C.transpose(); 129 129 Ct *= this->to_mat(); 130 Ct *= C; 131 } 132 133 ldmat Lnew=ldmat( Ct ); 134 L = Lnew.L; 135 D = Lnew.D; 136 } 137 138 void ldmat::mult_sym( const mat &C, ldmat &U, bool trans ) { 139 140 //TODO better 141 142 //TODO input test 143 144 mat Ct=C; 145 146 if ( trans==false ) { // return C*this*C' 147 Ct *= U.to_mat(); 148 Ct *= C.transpose(); 149 } else { // return C'*this*C 150 Ct = C.transpose(); 151 Ct *= U.to_mat(); 130 152 Ct *= C; 131 153 } … … 232 254 kD = 1.0; 233 255 *kr = 0.0; 234 if ( *Df < -threshold ) it_warning( "Problem in dydr: subraction of dyad results in negative definitness. Likely mistake in calling function." ); 256 if ( *Df < -threshold ) { 257 it_warning( "Problem in dydr: subraction of dyad results in negative definitness. Likely mistake in calling function." );} 235 258 *Df = 0.0; 236 259 }