DMP_BBO library
MetaParametersRRRFF.cpp
Go to the documentation of this file.
1 
24 #include <boost/serialization/export.hpp>
25 #include <boost/archive/text_iarchive.hpp>
26 #include <boost/archive/text_oarchive.hpp>
27 #include <boost/archive/xml_iarchive.hpp>
28 #include <boost/archive/xml_oarchive.hpp>
30 
33 
36 
37 #include <iostream>
38 
39 
40 using namespace std;
41 
42 namespace DmpBbo {
43 
44 MetaParametersRRRFF::MetaParametersRRRFF(int expected_input_dim, int number_of_basis_functions, double regularization, double gamma)
45  :
46  MetaParameters(expected_input_dim),
47  number_of_basis_functions_(number_of_basis_functions),
48  regularization_(regularization),
49  gamma_(gamma)
50 {
51 }
52 
54 {
55  return new MetaParametersRRRFF(getExpectedInputDim(),number_of_basis_functions_,regularization_,gamma_);
56 }
57 
58 template<class Archive>
59 void MetaParametersRRRFF::serialize(Archive & ar, const unsigned int version)
60 {
61  // serialize base class information
62  ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(MetaParameters);
63 
64  ar & BOOST_SERIALIZATION_NVP(number_of_basis_functions_);
65  ar & BOOST_SERIALIZATION_NVP(regularization_);
66  ar & BOOST_SERIALIZATION_NVP(gamma_);
67 }
68 
69 string MetaParametersRRRFF::toString(void) const
70 {
71  RETURN_STRING_FROM_BOOST_SERIALIZATION_XML("MetaParametersRRRFF");
72 }
73 
74 }
MetaParametersRRRFF * clone(void) const
Return a pointer to a deep copy of the MetaParameters object.
Meta-parameters for the RRRFF function approximator.
MetaParametersRRRFF class header file.
int getExpectedInputDim(void) const
The expected dimensionality of the input data.
#define RETURN_STRING_FROM_BOOST_SERIALIZATION_XML(name)
Macro to convert the boost XML serialization of an object into a string.
BOOST_CLASS_EXPORT_IMPLEMENT(DmpBbo::MetaParametersRRRFF)
For boost::serialization.
std::string toString(void) const
Returns a string representation of the object.
Base class for all meta-parameters of function approximators.
Header file to generate strings from boost serialized files.
Header file for serialization of Eigen matrices.