mlpack  2.0.1
save.hpp
Go to the documentation of this file.
1 
16 #ifndef __MLPACK_CORE_DATA_SAVE_HPP
17 #define __MLPACK_CORE_DATA_SAVE_HPP
18 
19 #include <mlpack/core/util/log.hpp>
20 #include <mlpack/core/arma_extend/arma_extend.hpp> // Includes Armadillo.
21 #include <string>
22 
23 #include "format.hpp"
24 
25 namespace mlpack {
26 namespace data {
27 
57 template<typename eT>
58 bool Save(const std::string& filename,
59  const arma::Mat<eT>& matrix,
60  const bool fatal = false,
61  bool transpose = true);
62 
88 template<typename T>
89 bool Save(const std::string& filename,
90  const std::string& name,
91  T& t,
92  const bool fatal = false,
94 
95 } // namespace data
96 } // namespace mlpack
97 
98 // Include implementation.
99 #include "save_impl.hpp"
100 
101 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
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.
format
Define the formats we can read through boost::serialization.
Definition: format.hpp:22