mlpack  master
load.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_CORE_DATA_LOAD_HPP
15 #define MLPACK_CORE_DATA_LOAD_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 #include "dataset_mapper.hpp"
23 
24 namespace mlpack {
25 namespace data {
26 
61 template<typename eT>
62 bool Load(const std::string& filename,
63  arma::Mat<eT>& matrix,
64  const bool fatal = false,
65  const bool transpose = true);
66 
99 template<typename eT, typename PolicyType>
100 bool Load(const std::string& filename,
101  arma::Mat<eT>& matrix,
102  DatasetMapper<PolicyType>& info,
103  const bool fatal = false,
104  const bool transpose = true);
105 
131 template<typename T>
132 bool Load(const std::string& filename,
133  const std::string& name,
134  T& t,
135  const bool fatal = false,
137 
138 } // namespace data
139 } // namespace mlpack
140 
141 // Include implementation.
142 #include "load_impl.hpp"
143 
144 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: binarize.hpp:18
bool Load(const std::string &filename, arma::Mat< eT > &matrix, const bool fatal=false, const bool transpose=true)
Loads a matrix from 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