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

Base class for all model parameters of function approximators. More...

#include <ModelParameters.hpp>

Inheritance diagram for ModelParameters:
Inheritance graph
[legend]
Collaboration diagram for ModelParameters:
Collaboration graph
[legend]

Public Member Functions

virtual ModelParametersclone (void) const =0
 Return a pointer to a deep copy of the ModelParameters object. More...
 
virtual std::string toString (void) const =0
 Returns a string representation of the object. More...
 
virtual int getExpectedInputDim (void) const =0
 The expected dimensionality of the input data. More...
 
virtual int getExpectedOutputDim (void) const
 The expected dimensionality of the output data. More...
 
virtual UnifiedModeltoUnifiedModel (void) const =0
 Convert these model parameters to unified model parameters. More...
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize class data members to boost archive. More...
 
- Public Member Functions inherited from Parameterizable
virtual ~Parameterizable (void)
 Destructor.
 
virtual int getParameterVectorSelectedSize (void) const
 Get the size of the vector of selected parameters, as returned by getParameterVectorSelected(. More...
 
virtual void getParameterVectorSelected (Eigen::VectorXd &values, bool normalized=false) const
 Get the values of the selected parameters in one vector. More...
 
virtual void getParameterVectorSelectedNormalized (Eigen::VectorXd &values) const
 Get the normalized values of the selected parameters in one vector. More...
 
void getParameterVectorSelectedMinMax (Eigen::VectorXd &min, Eigen::VectorXd &max) const
 Get the minimum and maximum of the selected parameters in one vector. More...
 
void getParameterVectorAllMinMax (Eigen::VectorXd &min, Eigen::VectorXd &max) const
 Get the minimum and maximum values of the current parameter vector. More...
 
void getParameterVectorSelectedRanges (Eigen::VectorXd &ranges) const
 Get the ranges of the selected parameters, i.e. More...
 
virtual void setParameterVectorSelected (const Eigen::VectorXd &values, bool normalized=false)
 Set all the values of the selected parameters with one vector. More...
 
virtual void setParameterVectorSelectedNormalized (const Eigen::VectorXd &values)
 Set all the values of the selected parameters with one vector of normalized values. More...
 
virtual void setSelectedParameters (const std::set< std::string > &selected_values_labels)
 Determine which subset of parameters is represented in the vector returned by Parameterizable::getParameterVectorSelected. More...
 
void setSelectedParametersOne (std::string selected)
 Set the parameters that are currently selected. More...
 
virtual void getSelectableParameters (std::set< std::string > &selected_values_labels) const =0
 Return all the names of the parameter types that can be selected. More...
 
virtual void getParameterVectorMask (const std::set< std::string > selected_values_labels, Eigen::VectorXi &selected_mask) const =0
 Get a mask for selecting parameters. More...
 
virtual int getParameterVectorAllSize (void) const =0
 Get the size of the parameter values vector when it contains all available parameter values. More...
 
virtual void getParameterVectorAll (Eigen::VectorXd &values) const =0
 Return a vector that returns all available parameter values. More...
 
virtual void setParameterVectorAll (const Eigen::VectorXd &values)=0
 Set all available parameter values with one vector. More...
 
void setParameterVectorModifier (std::string modifier, bool new_value)
 Turn certain modifiers on or off. More...
 
void setVectorLengthsPerDimension (const Eigen::VectorXi &lengths_per_dimension)
 The vector (VectorXd) with parameter values can be split into different parts (as vector<VectorXd>; this function specifices the length of each sub-vector. More...
 
Eigen::VectorXi getVectorLengthsPerDimension (void) const
 Get the specified length of each vector in each dimension. More...
 
void getParameterVectorSelected (std::vector< Eigen::VectorXd > &values, bool normalized=false) const
 Get the values of the selected parameters in one vector. More...
 
void setParameterVectorSelected (const std::vector< Eigen::VectorXd > &values, bool normalized=false)
 Set all the values of the selected parameters with a vector of vectors. More...
 

Friends

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

Detailed Description

Base class for all model parameters of function approximators.

Definition at line 42 of file ModelParameters.hpp.

Member Function Documentation

virtual ModelParameters* clone ( void  ) const
pure virtual

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

Returns
Pointer to a deep copy

Implemented in ModelParametersGMR, ModelParametersGPR, ModelParametersLWPR, ModelParametersRBFN, ModelParametersLWR, and ModelParametersRRRFF.

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

Returns a string representation of the object.

Returns
A string representation of the object.

Implemented in ModelParametersGMR, ModelParametersGPR, ModelParametersLWPR, ModelParametersRBFN, ModelParametersLWR, and ModelParametersRRRFF.

virtual int getExpectedInputDim ( void  ) const
pure virtual

The expected dimensionality of the input data.

Returns
Expected dimensionality of the input data

Implemented in ModelParametersGMR, ModelParametersGPR, ModelParametersLWPR, ModelParametersRBFN, ModelParametersLWR, and ModelParametersRRRFF.

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

Reimplemented in ModelParametersGMR.

Definition at line 81 of file ModelParameters.hpp.

82  {
83  return 1;
84  }

Here is the call graph for this function:

virtual UnifiedModel* toUnifiedModel ( void  ) const
pure virtual

Convert these model parameters to unified model parameters.

Returns
Unified model parameter representation (NULL if not implemented for a particular subclass)

Implemented in ModelParametersGMR, ModelParametersRBFN, ModelParametersLWR, ModelParametersGPR, ModelParametersLWPR, and ModelParametersRRRFF.

void serialize ( Archive &  ar,
const unsigned int  version 
)
inline

Serialize class data members to boost archive.

Parameters
[in]arBoost archive
[in]versionVersion of the class See http://www.boost.org/doc/libs/1_55_0/libs/serialization/doc/tutorial.html#simplecase

Definition at line 103 of file ModelParameters.hpp.

104  {
105  // serialize base class information
106  ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Parameterizable);
107  }

Here is the call graph for this function:

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Give boost serialization access to private members.

Definition at line 95 of file ModelParameters.hpp.

std::ostream& operator<< ( std::ostream &  output,
const ModelParameters model_parameters 
)
friend

Print to output stream.

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

Definition at line 62 of file ModelParameters.hpp.

62  {
63  output << model_parameters.toString();
64  return output;
65  }

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