Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
gtsam
3rdparty
Eigen
doc
snippets
BiCGSTAB_step_by_step.cpp
Go to the documentation of this file.
1
int
n
= 10000;
2
VectorXd
x
(
n
),
b
(
n
);
3
SparseMatrix<double>
A
(
n
,
n
);
4
/* ... fill A and b ... */
5
BiCGSTAB<SparseMatrix<double> >
solver
(
A
);
6
// start from a random solution
7
x
= VectorXd::Random(
n
);
8
solver
.setMaxIterations(1);
9
int
i
= 0;
10
do
{
11
x
=
solver
.solveWithGuess(
b
,
x
);
12
std::cout << i <<
" : "
<<
solver
.error() << std::endl;
13
++
i
;
14
}
while
(
solver
.info()!=
Success
&& i<100);
n
int n
Definition:
BiCGSTAB_step_by_step.cpp:1
A
Definition:
test_numpy_dtypes.cpp:254
Eigen::Success
Definition:
Constants.h:432
A
SparseMatrix< double > A(n, n)
b
VectorXd b(n)
i
int i
Definition:
BiCGSTAB_step_by_step.cpp:9
solver
BiCGSTAB< SparseMatrix< double > > solver(A)
x
x
Definition:
BiCGSTAB_step_by_step.cpp:7
gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:42