14 #ifndef MLPACK_CORE_DATA_SAVE_HPP 15 #define MLPACK_CORE_DATA_SAVE_HPP 18 #include <mlpack/core/arma_extend/arma_extend.hpp> 57 bool Save(
const std::string& filename,
58 const arma::Mat<eT>& matrix,
59 const bool fatal =
false,
60 bool transpose =
true);
88 bool Save(
const std::string& filename,
89 const std::string& name,
91 const bool fatal =
false,
104 template<
typename eT>
105 bool Save(
const std::string& filename,
106 arma::Mat<eT>& matrix,
108 const bool fatal =
false);
120 template<
typename eT>
121 bool Save(
const std::vector<std::string>& files,
122 arma::Mat<eT>& matrix,
124 const bool fatal =
false);
129 bool SaveImage(
const std::string& filename,
130 arma::Mat<unsigned char>& image,
132 const bool fatal =
false);
138 #include "save_impl.hpp"
bool SaveImage(const std::string &filename, arma::Mat< unsigned char > &image, ImageInfo &info, const bool fatal=false)
Helper function to save files.
format
Define the formats we can read through boost::serialization.
bool Save(const std::string &filename, const arma::Mat< eT > &matrix, const bool fatal=false, bool transpose=true)
Saves a matrix to file, guessing the filetype from the extension.