Fix bug #674: typo in documentation example for BiCGSTAB. They are now proper snippet files.
diff --git a/doc/snippets/BiCGSTAB_simple.cpp b/doc/snippets/BiCGSTAB_simple.cpp
new file mode 100644
index 0000000..5520f4f
--- /dev/null
+++ b/doc/snippets/BiCGSTAB_simple.cpp
@@ -0,0 +1,11 @@
+ int n = 10000;
+ VectorXd x(n), b(n);
+ SparseMatrix<double> A(n,n);
+ /* ... fill A and b ... */
+ BiCGSTAB<SparseMatrix<double> > solver;
+ solver.compute(A);
+ x = solver.solve(b);
+ std::cout << "#iterations: " << solver.iterations() << std::endl;
+ std::cout << "estimated error: " << solver.error() << std::endl;
+ /* ... update b ... */
+ x = solver.solve(b); // solve again
\ No newline at end of file
diff --git a/doc/snippets/BiCGSTAB_step_by_step.cpp b/doc/snippets/BiCGSTAB_step_by_step.cpp
new file mode 100644
index 0000000..06147bb
--- /dev/null
+++ b/doc/snippets/BiCGSTAB_step_by_step.cpp
@@ -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);
\ No newline at end of file
diff --git a/doc/snippets/compile_snippet.cpp.in b/doc/snippets/compile_snippet.cpp.in
index 894cd52..82ae891 100644
--- a/doc/snippets/compile_snippet.cpp.in
+++ b/doc/snippets/compile_snippet.cpp.in
@@ -1,4 +1,4 @@
-#include <Eigen/Dense>
+#include <Eigen/Eigen>
#include <iostream>
using namespace Eigen;