12 #ifndef MLPACK_BINDINGS_PYTHON_IMPORT_DECL_HPP 13 #define MLPACK_BINDINGS_PYTHON_IMPORT_DECL_HPP 29 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
34 std::string strippedType, printedType, defaultsType;
43 const std::string prefix = std::string(indent,
' ');
44 std::cout << prefix <<
"cdef cppclass " << defaultsType <<
":" << std::endl;
45 std::cout << prefix <<
" " << strippedType <<
"() nogil" << std::endl;
46 std::cout << prefix << std::endl;
56 const typename std::enable_if<!arma::is_arma_type<T>::value>::type* = 0,
69 const typename std::enable_if<arma::is_arma_type<T>::value>::type* = 0)
87 ImportDecl<typename std::remove_pointer<T>::type>(d, *((
size_t*) indent));
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
This structure holds all of the information about a single parameter, including its value (which is s...
void ImportDecl(util::ParamData &d, const size_t indent, const typename std::enable_if<!arma::is_arma_type< T >::value >::type *=0, const typename std::enable_if< data::HasSerialize< T >::value >::type *=0)
For a serializable type, print a cppclass definition.
void StripType(const std::string &inputType, std::string &strippedType, std::string &printedType, std::string &defaultsType)
Given an input type like, e.g., "LogisticRegression<>", return three types that can be used in Python...
std::string cppType
The true name of the type, as it would be written in C++.