10 #ifndef EIGEN_TESTSPARSE_H
11 #define EIGEN_TESTSPARSE_H
13 #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
27 #include <unordered_map>
28 #define EIGEN_UNORDERED_MAP_SUPPORT
32 #include <Eigen/Cholesky>
34 #include <Eigen/Sparse>
50 template<
typename Scalar,
int Opt1,
int Opt2,
typename StorageIndex>
void
75 v = internal::random<Scalar>()*
Scalar(3.);
105 template<
typename Scalar,
int Opt1,
int Opt2,
typename Index>
void
127 v = internal::random<Scalar>()*
Scalar(3.);
154 template<
typename Scalar,
int Options,
typename Index>
void
158 std::vector<int>* zeroCoords = 0,
159 std::vector<int>* nonzeroCoords = 0)
163 for(
int i=0;
i<refVec.size();
i++)
170 nonzeroCoords->push_back(
i);
173 zeroCoords->push_back(
i);
178 template<
typename Scalar,
int Options,
typename Index>
void
182 std::vector<int>* zeroCoords = 0,
183 std::vector<int>* nonzeroCoords = 0)
187 for(
int i=0;
i<refVec.size();
i++)
194 nonzeroCoords->push_back(
i);
197 zeroCoords->push_back(
i);
203 #include <unsupported/Eigen/SparseExtra>
204 #endif // EIGEN_TESTSPARSE_H