19 using namespace Eigen;
24 CDirectSparseLinearSolver::CDirectSparseLinearSolver()
36 REQUIRE(A,
"Operator is NULL!\n");
40 REQUIRE(op,
"Operator is not SparseMatrixOperator type!\n");
44 typedef SparseMatrix<float64_t> MatrixType;
54 SimplicialLLT<MatrixType> llt;
56 map_x=llt.solve(map_b);
59 if (llt.info()==NumericalIssue)
60 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)