Changeset be138d0 in tol
- Timestamp:
- May 24, 2010, 1:59:23 PM (16 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 86ae138
- Parents:
- ef24521
- Location:
- tol/bmath/blinalg
- Files:
-
- 2 edited
-
linalg.cpp (modified) (2 diffs)
-
tol_blinalg.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol/bmath/blinalg/linalg.cpp
ref24521 rbe138d0 292 292 } 293 293 294 //-------------------------------------------------------------------- 295 BMatrix<double> CholeskiMinimumResidualsSolve( 296 const BMatrix<double>& A, 297 const BMatrix<double>& b) 298 299 /*! Solves Ax=b using Cholesky decomposition 300 */ 301 //-------------------------------------------------------------------- 302 { 303 BMatrix<double> x; 304 BVMat A_, b_, x_; 305 A_.DMat2VMat(A, false,0.50,DEpsilon()); 306 b_.DMat2dense(b); 307 if(!BVMat::CholeskiMinRes(A_,b_,x_)) 308 { 309 x_.GetDMat(x); 310 } 311 return(x); 312 } 313 314 //-------------------------------------------------------------------- 315 BMat CholeskiMinimumResidualsSolve(const BMat& A, const BMat& b) 316 317 /*! Solves Ax=b using Cholesky decomposition 318 */ 319 //-------------------------------------------------------------------- 320 { 321 BMat x; 322 BMatrix<double>& dA = (BMatrix<double>&)A; 323 BMatrix<double>& db = (BMatrix<double>&)b; 324 BMatrix<double>& dx = (BMatrix<double>&)x; 325 dx = CholeskiMinimumResidualsSolve(dA,db); 326 return(x); 327 } 294 328 295 329 //-------------------------------------------------------------------- … … 379 413 BMat A = B << Urc.T(); 380 414 BMat z(n-r,1); z.SetAllValuesTo(0); 381 BMat v = MinimumResidualsSolve(A, y) ;415 BMat v = gsl_MinimumResidualsSolve(A, y) ; 382 416 383 417 for(j=0; j<c; j++) -
tol/bmath/blinalg/tol_blinalg.h
ref24521 rbe138d0 61 61 int maxIter = -1 62 62 ); 63 64 BMatrix<double> CholeskiMinimumResidualsSolve( 65 const BMatrix<double>& A, 66 const BMatrix<double>& b); 67 BMat CholeskiMinimumResidualsSolve( 68 const BMat& A, 69 const BMat& b); 70 63 71 64 72 BDat LinearLeastSquareSolve
Note: See TracChangeset
for help on using the changeset viewer.
