Public Member Functions | Private Attributes

LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE > Class Template Reference

#include <simulationparameters.h>

Inherits LibGeoDecomp::SimulationParametersHelpers::TypedParameter< VALUE_TYPE >.

Collaboration diagram for LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Private Attributes

VALUE_TYPE minimum
VALUE_TYPE maximum
double granularity
VALUE_TYPE index

template<typename VALUE_TYPE>
class LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >


Constructor & Destructor Documentation

template<typename VALUE_TYPE>
LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::Interval ( const VALUE_TYPE  minimum,
const VALUE_TYPE  maximum,
const double  granularity = 1 
) [inline]

Member Function Documentation

template<typename VALUE_TYPE>
Parameter* LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::clone (  )  const [inline, virtual]
template<typename VALUE_TYPE>
double LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::getGranularity (  )  const [inline, 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.

Implements LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter.

template<typename VALUE_TYPE>
double LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::getMax (  )  const [inline, virtual]

returns the upper bound of the interval.

The upper bound is excluded from the interval.

Implements LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter.

template<typename VALUE_TYPE>
double LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::getMin (  )  const [inline, virtual]

returns the lower bound of the interval.

The lower bound is included in the interval.

Implements LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter.

template<typename VALUE_TYPE>
double LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::getValue (  )  const [inline, virtual]

Returns a real-valued representation of the parameter's current value.

Implements LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter.

template<typename VALUE_TYPE>
void LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::operator+= ( double  step  )  [inline, virtual]

Move the parameter by the offset given by step.

Step sizes below granularity may have no effect.

Implements LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter.

template<typename VALUE_TYPE>
void LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::setValue ( double  newValue  )  [inline, virtual]

Sets the parameter, based on the given real value.

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

Implements LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter.

template<typename VALUE_TYPE>
std::string LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::toString (  )  const [inline, virtual]

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

Implements LibGeoDecomp::SimulationParametersHelpers::OptimizableParameter.


Member Data Documentation

template<typename VALUE_TYPE>
double LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::granularity [private]
template<typename VALUE_TYPE>
VALUE_TYPE LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::index [private]
template<typename VALUE_TYPE>
VALUE_TYPE LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::maximum [private]
template<typename VALUE_TYPE>
VALUE_TYPE LibGeoDecomp::SimulationParametersHelpers::Interval< VALUE_TYPE >::minimum [private]

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