15 #ifndef __MLPACK_CORE_DATA_EXTENSION_HPP
16 #define __MLPACK_CORE_DATA_EXTENSION_HPP
23 inline std::string
Extension(
const std::string& filename)
25 const size_t ext = filename.rfind(
'.');
26 std::string extension;
27 if (ext == std::string::npos)
30 extension = filename.substr(ext + 1);
31 std::transform(extension.begin(), extension.end(), extension.begin(),
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
std::string Extension(const std::string &filename)