mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clang-format tests, examples, libraries, benchmarks, etc.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
3252ecc7a4
commit
46e9cdb7fe
@@ -1,14 +1,14 @@
|
||||
int n = 10000;
|
||||
VectorXd x(n), b(n);
|
||||
SparseMatrix<double> A(n,n);
|
||||
/* ... fill A and b ... */
|
||||
BiCGSTAB<SparseMatrix<double> > solver(A);
|
||||
// start from a random solution
|
||||
x = VectorXd::Random(n);
|
||||
solver.setMaxIterations(1);
|
||||
int i = 0;
|
||||
do {
|
||||
x = solver.solveWithGuess(b,x);
|
||||
std::cout << i << " : " << solver.error() << std::endl;
|
||||
++i;
|
||||
} while (solver.info()!=Success && i<100);
|
||||
int n = 10000;
|
||||
VectorXd x(n), b(n);
|
||||
SparseMatrix<double> A(n, n);
|
||||
/* ... fill A and b ... */
|
||||
BiCGSTAB<SparseMatrix<double> > solver(A);
|
||||
// start from a random solution
|
||||
x = VectorXd::Random(n);
|
||||
solver.setMaxIterations(1);
|
||||
int i = 0;
|
||||
do {
|
||||
x = solver.solveWithGuess(b, x);
|
||||
std::cout << i << " : " << solver.error() << std::endl;
|
||||
++i;
|
||||
} while (solver.info() != Success && i < 100);
|
||||
|
||||
Reference in New Issue
Block a user