mlpack  2.0.1
load.hpp
Go to the documentation of this file.
1 
16 #ifndef __MLPACK_CORE_DATA_LOAD_HPP
17 #define __MLPACK_CORE_DATA_LOAD_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 #include "dataset_info.hpp"
25 
26 namespace mlpack {
27 namespace data {
28 
63 template<typename eT>
64 bool Load(const std::string& filename,
65  arma::Mat<eT>& matrix,
66  const bool fatal = false,
67  const bool transpose = true);
68 
101 template<typename eT>
102 bool Load(const std::string& filename,
103  arma::Mat<eT>& matrix,
104  DatasetInfo& info,
105  const bool fatal = false,
106  const bool transpose = true);
107 
133 template<typename T>
134 bool Load(const std::string& filename,
135  const std::string& name,
136  T& t,
137  const bool fatal = false,
139 
140 } // namespace data
141 } // namespace mlpack
142 
143 // Include implementation.
144 #include "load_impl.hpp"
145 
146 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
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:22