mlpack  master
save.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_CORE_DATA_SAVE_HPP
15 #define MLPACK_CORE_DATA_SAVE_HPP
16 
17 #include <mlpack/core/util/log.hpp>
18 #include <mlpack/core/arma_extend/arma_extend.hpp> // Includes Armadillo.
19 #include <string>
20 
21 #include "format.hpp"
22 
23 namespace mlpack {
24 namespace data {
25 
55 template<typename eT>
56 bool Save(const std::string& filename,
57  const arma::Mat<eT>& matrix,
58  const bool fatal = false,
59  bool transpose = true);
60 
86 template<typename T>
87 bool Save(const std::string& filename,
88  const std::string& name,
89  T& t,
90  const bool fatal = false,
92 
93 } // namespace data
94 } // namespace mlpack
95 
96 // Include implementation.
97 #include "save_impl.hpp"
98 
99 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: binarize.hpp:18
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:20
test cpp RESULT_VARIABLE MEX_RESULT_TRASH OUTPUT_VARIABLE MEX_OUTPUT ERROR_VARIABLE MEX_ERROR_TRASH string(REGEX MATCH"Warning: You are using"MEX_WARNING"${MEX_OUTPUT}") if(MEX_WARNING) string(REGEX REPLACE".*using [a-zA-Z]* version \"([0-9.]*)[^\"]*\".*""\\1"OTHER_COMPILER_VERSION"$
Definition: CMakeLists.txt:18