18 using namespace Eigen;
23 CDirectSparseLinearSolver::CDirectSparseLinearSolver()
35 REQUIRE(A,
"Operator is NULL!\n");
39 REQUIRE(op,
"Operator is not SparseMatrixOperator type!\n");
43 typedef SparseMatrix<float64_t> MatrixType;
53 SimplicialLLT<MatrixType> llt;
55 map_x=llt.solve(map_b);
58 if (llt.info()==NumericalIssue)
59 SG_WARNING(
"Matrix is not Hermitian positive definite!\n");
const index_t get_dimension() const
virtual SGVector< float64_t > solve(CLinearOperator< float64_t > *A, SGVector< float64_t > b)
virtual ~CDirectSparseLinearSolver()
static Eigen::SparseMatrix< T > toEigenSparse(SGSparseMatrix< T > sg_matrix)
Abstract template base class that provides an abstract solve method for linear systems, that takes a linear operator , a vector , solves the system and returns the vector .
all of classes and functions are contained in the shogun namespace
Class that represents a sparse-matrix linear operator. It computes matrix-vector product in its appl...
void set_const(T const_elem)