| 94 | |
| 95 | template<class rhs = DenseVector> |
| 96 | class SparseBiCG : public LinearSolver<SparseMatrix, rhs> |
| 97 | { |
| 98 | private: |
| 99 | bool doSolve(const SparseMatrix &A, const rhs &b, rhs &x) const |
| 100 | { |
| 101 | // Init BiCGSTAB solver (requires square matrices) |
| 102 | Eigen::BiCGSTAB<SparseMatrix> sparseSolver(A); |
| 103 | |
| 104 | if (sparseSolver.info() == Eigen::Success) |
| 105 | { |
| 106 | // Solve LSE |
| 107 | x = sparseSolver.solve(b); |
| 108 | |
| 109 | return sparseSolver.info() == Eigen::Success; |
| 110 | } |
| 111 | |
| 112 | return false; |
| 113 | } |
| 114 | }; |
| 115 | |
| 116 | template<class rhs = DenseVector> |
| 117 | class SparseLU : public LinearSolver<SparseMatrix, rhs> |
nothing calls this directly
no outgoing calls
no test coverage detected