Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
gtsam
3rdparty
Eigen
doc
snippets
BiCGSTAB_simple.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
;
6
solver
.compute(
A
);
7
x
=
solver
.solve(
b
);
8
std::cout <<
"#iterations: "
<<
solver
.iterations() << std::endl;
9
std::cout <<
"estimated error: "
<<
solver
.error() << std::endl;
10
/* ... update b ... */
11
x
=
solver
.solve(
b
);
// solve again
n
int n
Definition:
BiCGSTAB_simple.cpp:1
b
VectorXd b(n)
solver
BiCGSTAB< SparseMatrix< double > > solver
Definition:
BiCGSTAB_simple.cpp:5
A
Definition:
test_numpy_dtypes.cpp:254
x
x
Definition:
BiCGSTAB_simple.cpp:7
A
SparseMatrix< double > A(n, n)
gtsam
Author(s):
autogenerated on Sat May 8 2021 02:41:42