DMP_BBO library
MetaParametersGMR.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 using namespace std;
40 
41 namespace DmpBbo {
42 
43 MetaParametersGMR::MetaParametersGMR(int expected_input_dim, int number_of_gaussians)
44  :
45  MetaParameters(expected_input_dim),
46  number_of_gaussians_(number_of_gaussians)
47 {
48 }
49 
51 {
52  return new MetaParametersGMR(getExpectedInputDim(),number_of_gaussians_);
53 }
54 
55 template<class Archive>
56 void MetaParametersGMR::serialize(Archive & ar, const unsigned int version)
57 {
58  // serialize base class information
59  ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(MetaParameters);
60 
61  ar & BOOST_SERIALIZATION_NVP(number_of_gaussians_);
62 }
63 
64 string MetaParametersGMR::toString(void) const
65 {
66  RETURN_STRING_FROM_BOOST_SERIALIZATION_XML("MetaParametersGMR");
67 }
68 
69 }
int getExpectedInputDim(void) const
The expected dimensionality of the input data.
MetaParametersGMR class header file.
MetaParametersGMR * clone(void) const
Return a pointer to a deep copy of the MetaParameters object.
#define RETURN_STRING_FROM_BOOST_SERIALIZATION_XML(name)
Macro to convert the boost XML serialization of an object into a string.
Meta-parameters for the GMR function approximator.
BOOST_CLASS_EXPORT_IMPLEMENT(DmpBbo::MetaParametersGMR)
For boost::serialization.
Base class for all meta-parameters of function approximators.
std::string toString(void) const
Returns a string representation of the object.
Header file to generate strings from boost serialized files.
Header file for serialization of Eigen matrices.