DMP_BBO library
Public Member Functions | Protected Member Functions | Friends | List of all members
MetaParameters Class Referenceabstract

Base class for all meta-parameters of function approximators. More...

#include <MetaParameters.hpp>

Inheritance diagram for MetaParameters:
Inheritance graph
[legend]

Public Member Functions

 MetaParameters (int expected_input_dim)
 Constructor. More...
 
virtual MetaParametersclone (void) const =0
 Return a pointer to a deep copy of the MetaParameters object. More...
 
virtual ~MetaParameters (void)
 Virtual destructor, because this is a base class.
 
int getExpectedInputDim (void) const
 The expected dimensionality of the input data. More...
 
virtual int getExpectedOutputDim (void) const
 The expected dimensionality of the output data. More...
 
virtual std::string toString (void) const =0
 Returns a string representation of the object. More...
 

Protected Member Functions

 MetaParameters (void)
 Default constructor. More...
 

Friends

class boost::serialization::access
 Give boost serialization access to private members. More...
 
std::ostream & operator<< (std::ostream &output, const MetaParameters &meta_parameters)
 Print to output stream. More...
 

Detailed Description

Base class for all meta-parameters of function approximators.

Definition at line 36 of file MetaParameters.hpp.

Constructor & Destructor Documentation

MetaParameters ( int  expected_input_dim)

Constructor.

Parameters
[in]expected_input_dimExpected dimensionality of the input data

Definition at line 41 of file MetaParameters.cpp.

42 : expected_input_dim_(expected_input_dim)
43 {
44  assert(expected_input_dim_>0);
45 }
MetaParameters ( void  )
inlineprotected

Default constructor.

Remarks
This default constuctor is required for boost::serialization to work. Since this constructor should not be called by other classes, it is private (boost::serialization is a friend)

Definition at line 95 of file MetaParameters.hpp.

95 {};

Member Function Documentation

virtual MetaParameters* clone ( void  ) const
pure virtual

Return a pointer to a deep copy of the MetaParameters object.

Returns
Pointer to a deep copy

Implemented in MetaParametersLWR, MetaParametersRBFN, MetaParametersLWPR, MetaParametersGPR, MetaParametersRRRFF, and MetaParametersGMR.

int getExpectedInputDim ( void  ) const
inline

The expected dimensionality of the input data.

Returns
Expected dimensionality of the input data

Definition at line 57 of file MetaParameters.hpp.

58  {
59  return expected_input_dim_;
60  }
virtual int getExpectedOutputDim ( void  ) const
inlinevirtual

The expected dimensionality of the output data.

For now, we only consider 1-dimensional output by default.

Returns
Expected dimensionality of the output data

Definition at line 66 of file MetaParameters.hpp.

67  {
68  return 1;
69  }

Here is the call graph for this function:

virtual std::string toString ( void  ) const
pure virtual

Returns a string representation of the object.

Returns
A string representation of the object.

Implemented in MetaParametersLWR, MetaParametersRBFN, MetaParametersLWPR, MetaParametersGPR, MetaParametersRRRFF, and MetaParametersGMR.

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Give boost serialization access to private members.

Definition at line 102 of file MetaParameters.hpp.

std::ostream& operator<< ( std::ostream &  output,
const MetaParameters meta_parameters 
)
friend

Print to output stream.

Parameters
[in]outputOutput stream to which to write to
[in]meta_parametersMeta-parameters to write
Returns
Output stream
Remarks
Calls virtual function MetaParameters::toString, which must be implemented by subclasses: http://stackoverflow.com/questions/4571611/virtual-operator

Definition at line 51 of file MetaParameters.cpp.

51  {
52  output << meta_parameters.toString();
53  return output;
54 }

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