int n = 10000; VectorXd x(n), b(n); SparseMatrix A(n,n); /* ... fill A and b ... */ BiCGSTAB > 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