| 99 | #include "cs.h" |
| 100 | } |
| 101 | void eiToCSparse(const EigenSparseMatrix& src, cs* &dst) |
| 102 | { |
| 103 | cs* aux = cs_spalloc (0, 0, 1, 1, 1); |
| 104 | for (int j=0; j<src.cols(); ++j) |
| 105 | for (EigenSparseMatrix::InnerIterator it(src.derived(), j); it; ++it) |
| 106 | if (!cs_entry(aux, it.index(), j, it.value())) |
| 107 | { |
| 108 | std::cout << "cs_entry error\n"; |
| 109 | exit(2); |
| 110 | } |
| 111 | dst = cs_compress(aux); |
| 112 | // cs_spfree(aux); |
| 113 | } |
| 114 | #endif // CSPARSE |
| 115 | |
| 116 | #ifndef NOUBLAS |