DMP_BBO library
MetaParameters.hpp
Go to the documentation of this file.
1 
24 #ifndef METAPARAMETERS_H
25 #define METAPARAMETERS_H
26 
27 #include <iosfwd>
28 
29 #include <boost/serialization/nvp.hpp>
30 
31 namespace DmpBbo {
32 
37 {
38 public:
42  MetaParameters(int expected_input_dim);
43 
47  virtual MetaParameters* clone(void) const = 0;
48 
49 
52  virtual ~MetaParameters(void);
53 
57  int getExpectedInputDim(void) const
58  {
59  return expected_input_dim_;
60  }
61 
66  virtual int getExpectedOutputDim(void) const
67  {
68  return 1;
69  }
70 
74  virtual std::string toString(void) const = 0;
75 
85  friend std::ostream& operator<<(std::ostream& output, const MetaParameters& meta_parameters);
86 
87 protected:
88 
95  MetaParameters(void) {};
96 
97 private:
98  int expected_input_dim_;
99 
100 
103 
109  template<class Archive>
110  void serialize(Archive & ar, const unsigned int version)
111  {
112  ar & BOOST_SERIALIZATION_NVP(expected_input_dim_);
113  }
114 
115 };
116 
117 }
118 
119 
121 #include <boost/serialization/assume_abstract.hpp>
123 
125 #include <boost/serialization/export.hpp>
126 BOOST_CLASS_IMPLEMENTATION(DmpBbo::MetaParameters,boost::serialization::object_serializable);
127 
128 #endif // #ifndef METAPARAMETERS_H
129 
virtual MetaParameters * clone(void) const =0
Return a pointer to a deep copy of the MetaParameters object.
int getExpectedInputDim(void) const
The expected dimensionality of the input data.
BOOST_SERIALIZATION_ASSUME_ABSTRACT(DmpBbo::MetaParameters)
Tell boost serialization that this class has pure virtual functions.
virtual ~MetaParameters(void)
Virtual destructor, because this is a base class.
BOOST_CLASS_IMPLEMENTATION(DmpBbo::MetaParameters, boost::serialization::object_serializable)
Don&#39;t add version information to archives.
MetaParameters(void)
Default constructor.
Base class for all meta-parameters of function approximators.
friend std::ostream & operator<<(std::ostream &output, const MetaParameters &meta_parameters)
Print to output stream.
friend class boost::serialization::access
Give boost serialization access to private members.
virtual int getExpectedOutputDim(void) const
The expected dimensionality of the output data.
virtual std::string toString(void) const =0
Returns a string representation of the object.