SYNOPSIS

Public Member Functions

SaveRestoreUtility ()

~SaveRestoreUtility ()

template<typename T > T & LoadParameter (T &t, const std::string &name)

LoadParameter loads a parameter from the parameters map. template<typename T > std::vector< T > & LoadParameter (std::vector< T > &v, const std::string &name)

LoadParameter loads a parameter from the parameters map. char LoadParameter (char c, const std::string &name)

LoadParameter loads a character from the parameters map. std::string LoadParameter (std::string &str, const std::string &name)

LoadParameter loads a string from the parameters map. arma::mat & LoadParameter (arma::mat &matrix, const std::string &name)

LoadParameter loads an arma::mat from the parameters map. template<> arma::vec & LoadParameter (arma::vec &t, const std::string &name)

Specialization for arma::vec. bool ReadFile (const std::string &filename)

ReadFile reads an XML tree from a file. template<typename T > void SaveParameter (const T &t, const std::string &name)

SaveParameter saves a parameter to the parameters map. template<typename T > void SaveParameter (const std::vector< T > &v, const std::string &name)

SaveParameter saves a parameter to the parameters map. void SaveParameter (const char c, const std::string &name)

SaveParameter saves a character to the parameters map. void SaveParameter (const arma::mat &mat, const std::string &name)

SaveParameter saves an arma::mat to the parameters map. template<> void SaveParameter (const arma::vec &t, const std::string &name)

Specialization for arma::vec. bool WriteFile (const std::string &filename)

WriteFile writes the XML tree to a file.

Private Member Functions

void RecurseOnNodes (xmlNode *n)

RecurseOnNodes performs a depth first search of the XML tree.

Private Attributes

std::map< std::string,

std::string > parameters"

parameters contains a list of names and parameters in string form.

Detailed Description

Definition at line 42 of file save_restore_utility.hpp.

Constructor & Destructor Documentation

mlpack::util::SaveRestoreUtility::SaveRestoreUtility ()\fC [inline]\fP

Definition at line 56 of file save_restore_utility.hpp.

mlpack::util::SaveRestoreUtility::~SaveRestoreUtility ()\fC [inline]\fP

Definition at line 57 of file save_restore_utility.hpp.

References parameters.

Member Function Documentation

template<typename T > T& mlpack::util::SaveRestoreUtility::LoadParameter (T &t, const std::string &name)

LoadParameter loads a parameter from the parameters map.

template<typename T > std::vector<T>& mlpack::util::SaveRestoreUtility::LoadParameter (std::vector< T > &v, const std::string &name)

LoadParameter loads a parameter from the parameters map.

char mlpack::util::SaveRestoreUtility::LoadParameter (charc, const std::string &name)

LoadParameter loads a character from the parameters map.

std::string mlpack::util::SaveRestoreUtility::LoadParameter (std::string &str, const std::string &name)

LoadParameter loads a string from the parameters map.

arma::mat& mlpack::util::SaveRestoreUtility::LoadParameter (arma::mat &matrix, const std::string &name)

LoadParameter loads an arma::mat from the parameters map.

template<> arma::vec& mlpack::util::SaveRestoreUtility::LoadParameter (arma::vec &t, const std::string &name)

Specialization for arma::vec.

bool mlpack::util::SaveRestoreUtility::ReadFile (const std::string &filename)

ReadFile reads an XML tree from a file.

void mlpack::util::SaveRestoreUtility::RecurseOnNodes (xmlNode *n)\fC [private]\fP

RecurseOnNodes performs a depth first search of the XML tree.

template<typename T > void mlpack::util::SaveRestoreUtility::SaveParameter (const T &t, const std::string &name)

SaveParameter saves a parameter to the parameters map.

template<typename T > void mlpack::util::SaveRestoreUtility::SaveParameter (const std::vector< T > &v, const std::string &name)

SaveParameter saves a parameter to the parameters map.

void mlpack::util::SaveRestoreUtility::SaveParameter (const charc, const std::string &name)

SaveParameter saves a character to the parameters map.

void mlpack::util::SaveRestoreUtility::SaveParameter (const arma::mat &mat, const std::string &name)

SaveParameter saves an arma::mat to the parameters map.

template<> void mlpack::util::SaveRestoreUtility::SaveParameter (const arma::vec &t, const std::string &name)

Specialization for arma::vec.

bool mlpack::util::SaveRestoreUtility::WriteFile (const std::string &filename)

WriteFile writes the XML tree to a file.

Member Data Documentation

std::map<std::string, std::string> mlpack::util::SaveRestoreUtility::parameters\fC [private]\fP

parameters contains a list of names and parameters in string form.

Definition at line 48 of file save_restore_utility.hpp.

Referenced by ~SaveRestoreUtility().

Author

Generated automatically by Doxygen for MLPACK from the source code.