Class schedule::Constant
The schedule (or schedule segment) has a constant value over the input range. If queried for values outside the input range, the same constant value is returned as well. Configuration Examples:
- Basic definition:
"schedule": {
"type": "constant",
"value": 42.0
}
- Short-hand notation:
"schedule": 42.0
- With input range:
"schedule": {
"type": "constant",
"value": 42.0,
"start": 0,
"stop": 13
}
- With count:
"schedule": {
"type": "constant",
"value": 42.0,
"count": 100
}
Note
Since the value of this generator is constant, the properties start
, stop
and count
only affect how many times the value is repeated when used as a Segment
or generating a discretized set.
Inherited Members
Constructors
Constant()
Declaration
schedule::Constant::Constant(double value)
Constant()
Declaration
schedule::Constant::Constant(const Constant&other)
Constant()
Declaration
schedule::Constant::Constant()=default
Methods
get_progress_value()
Get the value at a relative position in the input interval.
Arguments: progress
relative input position \in [0..1]
Returns: the (constant) value of the generator.
Declaration
double schedule::Constant::get_progress_value(double) const override
configure()
Configure the Constant generator from input.
This expects either the long (object) or short (scalar) input format, as described in the class description.
Declaration
void schedule::Constant::configure(const utils::Json&json) override
render()
Return the config value for schedule.
Declaration
utils::Structure schedule::Constant::render() const override