30 #ifndef __MatrixEigenSparse_H
31 #define __MatrixEigenSparse_H 1
35 #include <boost/version.hpp>
36 #if (BOOST_VERSION >= 103400)
37 #include <boost/none.hpp>
39 #include <boost/none_t.hpp>
43 #include <Eigen/SparseCore>
51 template<
typename T,
typename Storage>
class VectorUblas;
83 typedef typename type_traits<value_type>::real_type real_type;
84 typedef Eigen::SparseMatrix<T> matrix_type;
86 typedef typename super::graph_ptrtype graph_ptrtype;
87 typedef Eigen::Triplet<T> triplet;
150 return M_mat.rows()*M_mat.cols();
176 return M_is_initialized;
199 matrix_type
const&
mat ()
const
247 graph_ptrtype
const&
graph );
284 const value_type& value )
286 M_tripletList.push_back(triplet(i, j, value) );
299 const value_type& value )
301 FEELPP_ASSERT( 0 ).error(
"nor supported" );
311 void printMatlab(
const std::string name=
"NULL" )
const;
346 void addMatrix(
const ublas::matrix<T, ublas::row_major>&,
347 const std::vector<size_type>&,
348 const std::vector<size_type>& ) {}
354 void addMatrix(
const boost::numeric::ublas::matrix<T, ublas::row_major>&,
const std::vector<size_type>& ) {}
370 int* cols,
int ncols,
373 void scale(
const T a );
392 return real_type( 0 );
407 return real_type( 0 );
423 bool M_is_initialized;
424 mutable bool M_is_closed;
429 mutable matrix_type M_mat;
430 mutable std::vector<triplet> M_tripletList;