mlpack  3.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
detect_file_type.hpp
Go to the documentation of this file.
1 
15 #ifndef MLPACK_CORE_DATA_DETECT_FILE_TYPE_HPP
16 #define MLPACK_CORE_DATA_DETECT_FILE_TYPE_HPP
17 
18 namespace mlpack {
19 namespace data {
20 
26 std::string GetStringType(const arma::file_type& type);
27 
35 arma::file_type GuessFileType(std::istream& f);
36 
47 arma::file_type AutoDetect(std::fstream& stream,
48  const std::string& filename);
49 
56 arma::file_type DetectFromExtension(const std::string& filename);
57 
58 } // namespace data
59 } // namespace mlpack
60 
61 #endif
arma::file_type GuessFileType(std::istream &f)
Given an istream, attempt to guess the file type.
std::string GetStringType(const arma::file_type &type)
Given a file type, return a logical name corresponding to that file type.
arma::file_type AutoDetect(std::fstream &stream, const std::string &filename)
Attempt to auto-detect the type of a file given its extension, and by inspecting the parts of the fil...
src mlpack core util version hpp VERSION_HPP_CONTENTS string(REGEX REPLACE".*#define MLPACK_VERSION_MAJOR ([0-9]+).*""\\1"MLPACK_VERSION_MAJOR"${VERSION_HPP_CONTENTS}") string(REGEX REPLACE".* MLPACK_VERSION_MINOR "$
Definition: CMakeLists.txt:79
arma::file_type DetectFromExtension(const std::string &filename)
Return the type based only on the extension.