6 #ifndef TAPKEE_SPARSE_H_
7 #define TAPKEE_SPARSE_H_
15 namespace tapkee_internal
20 #ifdef EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
21 Eigen::DynamicSparseMatrix<ScalarType> dynamic_weight_matrix(m, n);
22 dynamic_weight_matrix.reserve(sparse_triplets.size());
23 for (SparseTriplets::const_iterator it=sparse_triplets.begin(); it!=sparse_triplets.end(); ++it)
24 dynamic_weight_matrix.coeffRef(it->col(),it->row()) += it->value();
28 matrix.setFromTriplets(sparse_triplets.begin(),sparse_triplets.end());
TAPKEE_INTERNAL_VECTOR< tapkee::tapkee_internal::SparseTriplet > SparseTriplets
SparseMatrix sparse_matrix_from_triplets(const SparseTriplets &sparse_triplets, IndexType m, IndexType n)
int IndexType
indexing type (non-overridable) set to int for compatibility with OpenMP 2.0
Eigen::SparseMatrix< tapkee::ScalarType > SparseMatrix
sparse matrix type (non-overridable)