mlpack
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 
39 arma::file_type GuessFileType(std::istream& f);
40 
54 arma::file_type AutoDetect(std::fstream& stream,
55  const std::string& filename);
56 
63 arma::file_type DetectFromExtension(const std::string& filename);
64 
65 } // namespace data
66 } // namespace mlpack
67 
68 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
arma::file_type GuessFileType(std::istream &f)
Given an istream, attempt to guess the file type.
Definition: detect_file_type.cpp:56
std::string GetStringType(const arma::file_type &type)
Given a file type, return a logical name corresponding to that file type.
Definition: detect_file_type.cpp:30
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...
Definition: detect_file_type.cpp:192
arma::file_type DetectFromExtension(const std::string &filename)
Return the type based only on the extension.
Definition: detect_file_type.cpp:310