itom 2.2.0
|
Meta-information for Param of type IntArrayMeta that represent an interval [minimum, maximum). More...
#include <paramMeta.h>
Public Member Functions | |
IntervalMeta (int32 minVal, int32 maxVal, int32 stepSize=1) | |
IntervalMeta (int32 minVal, int32 maxVal, int32 stepSize, int32 sizeMin, int32 sizeMax, int32 intervalStep=1) | |
int | getSizeMin () const |
returns minimum size of interval or range | |
int | getSizeMax () const |
returns maximum size of interval or range | |
int | getSizeStepSize () const |
returns step size of size of interval or range | |
bool | isIntervalNotRange () const |
void | setIntervalMin (int32 val) |
sets the minimum size of the interval (= max-min) | |
void | setIntervalMax (int32 val) |
sets the maximum size of the interval (= max-min) | |
void | setIntervalStep (int32 val) |
sets the step size of the size of the interval (= max-min) | |
Protected Attributes | |
int32 | m_sizeMin |
int32 | m_sizeMax |
int32 | m_sizeStep |
bool | m_isIntervalNotRange |
this flag describes if this object is an interval where its interval/range is (end-begin) or a range with (1+end-begin) |
Meta-information for Param of type IntArrayMeta that represent an interval [minimum, maximum).
An object of this class can be used to parametrize a parameter whose type is ito::ParamBase::IntArray. This meta information class indicates that the corresponding integer array parameter is interpreted as an interval, hence, only an array consisting of two values is accepted. The size of the interval is defined by the difference (value[1] - value[0]). You can restrict this size to a certain minimum and maximum value as well as indicating a specific step size (default: 1).
An example for an interval might be a certain interval of allowed radius values when optimizing a cylinder fit.
void ito::IntervalMeta::setIntervalMax | ( | int32 | val | ) |
sets the maximum size of the interval (= max-min)
val | is the new maximum value, if this is smaller than the current minimum value, the minimum value is changed to val, too |
void ito::IntervalMeta::setIntervalMin | ( | int32 | val | ) |
sets the minimum size of the interval (= max-min)
val | is the new minimum value, if this is bigger than the current maximum value, the maximum value is changed to val, too |
void ito::IntervalMeta::setIntervalStep | ( | int32 | val | ) |
sets the step size of the size of the interval (= max-min)
val | is the new step size, hence only discrete values [minVal, minVal+stepSize, minVal+2*stepSize...,maxVal] are allowed |