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 arma::SpMat<eT>& matrix,
90 const bool fatal =
false,
91 bool transpose =
true);
119 bool Save(
const std::string& filename,
120 const std::string& name,
122 const bool fatal =
false,
134 template<
typename eT>
135 bool Save(
const std::string& filename,
136 arma::Mat<eT>& matrix,
138 const bool fatal =
false);
149 template<
typename eT>
150 bool Save(
const std::vector<std::string>& files,
151 arma::Mat<eT>& matrix,
153 const bool fatal =
false);
158 bool SaveImage(
const std::string& filename,
159 arma::Mat<unsigned char>& image,
161 const bool fatal =
false);
167 #include "save_impl.hpp" Linear algebra utility functions, generally performed on matrices or vectors.
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.