Public Member Functions

LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter Class Reference

Virtual interface which allows the implementation of auto-tuners and parameter optimizers without them having to unterstand the actual meaning of the parameters. More...

#include <simulationparameters.h>

Inherited by LibGeoDecomp::SimulationParametersHelpers::Parameter.

List of all members.

Public Member Functions

virtual ~OptimizableParameter ()
virtual double getMin () const =0
 returns the lower bound of the interval.
virtual double getMax () const =0
 returns the upper bound of the interval.
virtual double getGranularity () const =0
 The granularity gives the minimum value that a parameter needs to change in order to actually affect the model.
virtual double getValue () const =0
 Returns a real-valued representation of the parameter's current value.
virtual void setValue (double newValue)=0
 Sets the parameter, based on the given real value.
virtual void operator+= (double step)=0
 Move the parameter by the offset given by step.
virtual std::string toString () const =0
 Pretty-printed string repesentation of parameter (domain and value), most useful for debug output.

Detailed Description

Virtual interface which allows the implementation of auto-tuners and parameter optimizers without them having to unterstand the actual meaning of the parameters.

For that all parameters are mapped to an interval [min, max[ in R.

See the unit tests for an explanation on how to use this interface.


Constructor & Destructor Documentation

virtual LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter::~OptimizableParameter (  )  [inline, virtual]

Member Function Documentation

virtual double LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter::getGranularity (  )  const [pure virtual]

The granularity gives the minimum value that a parameter needs to change in order to actually affect the model.

Most parameters won't actually have a real-valued valuation. For these the granularity is almost always 1.

Implemented in LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >, and LibGeoDecomp::SimulationParametersHelpers::DiscreteSet< VALUE_TYPE >.

virtual double LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter::getMax (  )  const [pure virtual]

returns the upper bound of the interval.

The upper bound is excluded from the interval.

Implemented in LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >, and LibGeoDecomp::SimulationParametersHelpers::DiscreteSet< VALUE_TYPE >.

virtual double LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter::getMin (  )  const [pure virtual]

returns the lower bound of the interval.

The lower bound is included in the interval.

Implemented in LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >, and LibGeoDecomp::SimulationParametersHelpers::DiscreteSet< VALUE_TYPE >.

virtual double LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter::getValue (  )  const [pure virtual]
virtual void LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter::operator+= ( double  step  )  [pure virtual]

Move the parameter by the offset given by step.

Step sizes below granularity may have no effect.

Implemented in LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >, and LibGeoDecomp::SimulationParametersHelpers::DiscreteSet< VALUE_TYPE >.

virtual void LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter::setValue ( double  newValue  )  [pure virtual]

Sets the parameter, based on the given real value.

Note that rounding and truncation based on the granularity may occur.

Implemented in LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >, and LibGeoDecomp::SimulationParametersHelpers::DiscreteSet< VALUE_TYPE >.

virtual std::string LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter::toString (  )  const [pure virtual]

Pretty-printed string repesentation of parameter (domain and value), most useful for debug output.

Implemented in LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >, and LibGeoDecomp::SimulationParametersHelpers::DiscreteSet< VALUE_TYPE >.


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