LinearVariable

data class LinearVariable(val default: Double, val min: Double, val max: Double, val step: Double) : AbstractPrintableVariable<Double> (source)

A variable that spans linearly between a minimum and a maximum value.

This is represented as a sequence of values starting at min, incrementing by step, and not exceeding max. The default parameter is the default value for the variable (it is not constrained to be exactly one of the generated steps).

Note: kept as a data class for convenient structural equality and debugging; the implementation preserves the original behavior of the prior class.

Constructors

Link copied to clipboard
constructor(default: Double, min: Double, max: Double, step: Double)

Properties

Link copied to clipboard
open override val default: Double

default value

Link copied to clipboard
val max: Double

maximum value (inclusive)

Link copied to clipboard
val min: Double

minimum value (inclusive)

Link copied to clipboard

step increment between successive values

Functions

Link copied to clipboard
open operator override fun iterator(): MutableIterator<Double?>
Link copied to clipboard
open override fun steps(): Long
Link copied to clipboard
open override fun stream(): Stream<Double>