26 #ifndef EIGENSAVEMATRIX_HPP 27 #define EIGENSAVEMATRIX_HPP 33 #include <boost/filesystem.hpp> 35 #include <eigen3/Eigen/Core> 44 template<
typename Scalar,
int RowsAtCompileTime,
int ColsAtCompileTime>
45 bool loadMatrix(std::string filename, Eigen::Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime>& m);
54 template<
typename Scalar,
int RowsAtCompileTime,
int ColsAtCompileTime>
55 bool saveMatrix(std::string filename, Eigen::Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> matrix,
bool overwrite=
false);
65 template<
typename Scalar,
int RowsAtCompileTime,
int ColsAtCompileTime>
66 bool saveMatrix(std::string directory, std::string filename, Eigen::Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> matrix,
bool overwrite=
false);
72 #endif // #ifndef EIGENSAVEMATRIX_HPP Source file for input/output of Eigen matrices to ASCII files.
bool saveMatrix(std::string filename, Eigen::Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > matrix, bool overwrite=false)
Save an Eigen matrix to an ASCII file.
bool loadMatrix(std::string filename, Eigen::Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > &m)
Load an Eigen matrix from an ASCII file.