24 #include <yarp/os/Bottle.h>
27 namespace learningmachine {
75 virtual void readBottle(yarp::os::Bottle& bot);
117 return (val * this->scale) + this->
offset;
175 virtual bool fromString(
const std::string& str);
180 virtual bool configure(yarp::os::Searchable& config);
The IScaler is a linear scaler based scaler.
virtual std::string getInfo()
Asks the learning machine to return a string containing statistics on its operation so far.
virtual IScaler * clone()=0
Asks the scaler to return a new object of its type.
virtual std::string toString()
Asks the scaler to return a string serialization.
IScaler(double s=1., double o=0.)
Constructor.
std::string getName() const
Retrieve the name of this scaler.
std::string name
The name of this type of scaler.
virtual void writeBottle(yarp::os::Bottle &bot)
Writes a serialization of the scaler into a bottle.
void setName(std::string name)
Set the name of this machine learning technique.
double scale
The scale for the linear transformation.
virtual void update(double val)
Feeds a single sample into the scaler, so that it can use this sample to update the offset and scale.
bool updateEnabled
Boolean indicating whether the scaler has to update each sample.
virtual double transform(double val)
Transforms a single sample value according to the state of the scaler.
virtual void setUpdateEnabled(bool u)
Mutator for the update state.
virtual bool fromString(const std::string &str)
Asks the scaler to initialize from a string serialization.
virtual void readBottle(yarp::os::Bottle &bot)
Unserializes a scaler from a bottle.
virtual bool getUpdateEnabled()
Accessor for the update state.
double offset
The offset for the linear transformation.
virtual double unTransform(double val)
Untransforms a single sample value according to the state of the scaler.
virtual ~IScaler()
Destructor (empty).
virtual bool configure(yarp::os::Searchable &config)
The NullScaler is a scaler that does nothing, the output of the transform function is equal to its in...
virtual NullScaler * clone()
Asks the scaler to return a new object of its type.
virtual double unTransform(double val)
Untransforms a single sample value according to the state of the scaler.
virtual double transform(double val)
Transforms a single sample value according to the state of the scaler.
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.