Registered Member
|
Hello,
what is the best way to write a sparse matrix into a file (resp. to read it from a file)? best, David |
Moderator
|
in short:
#include <unsupported/Eigen/SparseExtra> ... saveMarket(mat, "filename.mtx"); .. loadMarket(mat, "filename.mtx"); |
Registered Member
|
|
Registered Member
|
I tried to use this, and I get:
error: ‘saveMarket’ is not a member of ‘Eigen’ |
Moderator
|
which Eigen version are you using? and don't forget to #include <unsupported/Eigen/SparseExtra>
|
Registered Member
|
I don't remember, but from the date of download it is probably 3.04.
Of course I included <unsupported/Eigen/SparseExtra> |
Moderator
|
For sparse stuff, it is recommended to use the devel branch which at few bits to become the 3.1
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell