Home
Get Started
Documentation
Community
Google Summer of Code
FAQ
GitHub
Home
Get Started
Documentation
Community
Google Summer of Code
FAQ
GitHub
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
#include "
image_info.hpp
"
23
24
namespace
mlpack
{
25
namespace
data {
26
56
template
<
typename
eT>
57
bool
Save
(
const
std::string& filename,
58
const
arma::Mat<eT>& matrix,
59
const
bool
fatal =
false
,
60
bool
transpose =
true
);
61
87
template
<
typename
T>
88
bool
Save
(
const
std::string& filename,
89
const
std::string& name,
90
T& t,
91
const
bool
fatal =
false
,
92
format
f =
format::autodetect
);
93
94
#ifdef HAS_STB
95
106
template
<
typename
eT>
107
bool
Save
(
const
std::string& filename,
108
arma::Mat<eT>& matrix,
109
ImageInfo& info,
110
const
bool
fatal =
false
,
111
const
bool
transpose =
true
);
112
123
template
<
typename
eT>
124
bool
Save
(
const
std::vector<std::string>& files,
125
arma::Mat<eT>& matrix,
126
ImageInfo& info,
127
const
bool
fatal =
false
,
128
const
bool
transpose =
true
);
129
130
#endif // HAS_STB.
131
132
}
// namespace data
133
}
// namespace mlpack
134
135
// Include implementation.
136
#include "save_impl.hpp"
137
138
#endif
mlpack
strip_type.hpp
Definition:
add_to_po.hpp:21
image_info.hpp
mlpack::data::format
format
Define the formats we can read through boost::serialization.
Definition:
format.hpp:20
format.hpp
mlpack::data::Save
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.
log.hpp
mlpack::data::autodetect
Definition:
format.hpp:22