mlpack::util::SaveRestoreUtility Class Reference

List of all members.

Public Member Functions

 SaveRestoreUtility ()
 ~SaveRestoreUtility ()
template<>
arma::vec & LoadParameter (arma::vec &t, const std::string &name)
 Specialization for arma::vec.
arma::mat & LoadParameter (arma::mat &matrix, const std::string &name)
 LoadParameter loads an arma::mat from the parameters map.
std::string LoadParameter (std::string &str, const std::string &name)
 LoadParameter loads a string from the parameters map.
char LoadParameter (char c, const std::string &name)
 LoadParameter loads a character 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.
template<typename T >
T & LoadParameter (T &t, const std::string &name)
 LoadParameter loads a parameter from the parameters map.
bool ReadFile (const std::string &filename)
 ReadFile reads an XML tree from a file.
template<>
void SaveParameter (const arma::vec &t, const std::string &name)
 Specialization for arma::vec.
void SaveParameter (const arma::mat &mat, const std::string &name)
 SaveParameter saves an arma::mat to the parameters map.
void SaveParameter (const char c, const std::string &name)
 SaveParameter saves a character 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.
template<typename T >
void SaveParameter (const T &t, const std::string &name)
 SaveParameter saves a parameter to the parameters map.
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 (  )  [inline]

Definition at line 56 of file save_restore_utility.hpp.

mlpack::util::SaveRestoreUtility::~SaveRestoreUtility (  )  [inline]

Definition at line 57 of file save_restore_utility.hpp.

References parameters.


Member Function Documentation

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

Specialization for arma::vec.

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

LoadParameter loads an arma::mat 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.

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

LoadParameter loads a character from the parameters map.

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

LoadParameter loads a parameter from the parameters map.

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

LoadParameter loads a parameter from the parameters map.

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

ReadFile reads an XML tree from a file.

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

RecurseOnNodes performs a depth first search of the XML tree.

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

Specialization for arma::vec.

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

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

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

SaveParameter saves a character to the parameters map.

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

SaveParameter saves a parameter to the parameters map.

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

SaveParameter saves a parameter to the parameters map.

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 [private]

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

Definition at line 48 of file save_restore_utility.hpp.

Referenced by ~SaveRestoreUtility().


The documentation for this class was generated from the following file:

Generated on 13 Aug 2014 for MLPACK by  doxygen 1.6.1