mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-07 01:22:59 +08:00
Move eigen to third party (#282)
* remove useless statement * Add eigen to third_party dir * remove reducdant lines
This commit is contained in:
14
third_party/eigen/doc/snippets/BiCGSTAB_step_by_step.cpp
vendored
Normal file
14
third_party/eigen/doc/snippets/BiCGSTAB_step_by_step.cpp
vendored
Normal file
@@ -0,0 +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);
|
Reference in New Issue
Block a user