mlpack 3.4.2
Namespaces | Functions
detect_file_type.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  mlpack
 Linear algebra utility functions, generally performed on matrices or vectors.
 
namespace  mlpack::data
 Functions to load and save matrices and models.
 

Functions

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 file to disambiguate between types when necessary. More...
 
arma::file_type DetectFromExtension (const std::string &filename)
 Return the type based only on the extension. More...
 
std::string GetStringType (const arma::file_type &type)
 Given a file type, return a logical name corresponding to that file type. More...
 
arma::file_type GuessFileType (std::istream &f)
 Given an istream, attempt to guess the file type. More...
 

Detailed Description

Author
Conrad Sanderson
Ryan Curtin

Functionality to guess the type of a file by inspecting it. Parts of the implementation are adapted from the Armadillo sources and relicensed to be a part of mlpack with permission from Conrad.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.

Definition in file detect_file_type.hpp.