mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-03 19:55:15 +08:00
fix CG example
This commit is contained in:
parent
01b4b6e456
commit
2d4fe54b73
@ -120,7 +120,7 @@ struct traits<ConjugateGradient<_MatrixType,_UpLo,_Preconditioner> >
|
|||||||
* SparseMatrix<double> A(n,n);
|
* SparseMatrix<double> A(n,n);
|
||||||
* // fill A and b
|
* // fill A and b
|
||||||
* ConjugateGradient<SparseMatrix<double> > cg;
|
* ConjugateGradient<SparseMatrix<double> > cg;
|
||||||
* cg(A);
|
* cg.compute(A);
|
||||||
* x = cg.solve(b);
|
* x = cg.solve(b);
|
||||||
* std::cout << "#iterations: " << cg.iterations() << std::endl;
|
* std::cout << "#iterations: " << cg.iterations() << std::endl;
|
||||||
* std::cout << "estimated error: " << cg.error() << std::endl;
|
* std::cout << "estimated error: " << cg.error() << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user