public abstract class DoubleSignalSourceChooser extends AbstractSignalSourceChooser implements DoubleSignalSource
double
that choose
dynamically from a fixed collection of inputs.Modifier and Type | Class and Description |
---|---|
(package private) static class |
DoubleSignalSourceChooser.OfEnum<E extends Enum<E>> |
(package private) static class |
DoubleSignalSourceChooser.OfEnumInt<E extends Enum<E>> |
(package private) static class |
DoubleSignalSourceChooser.OfInt |
Constructor and Description |
---|
DoubleSignalSourceChooser() |
Modifier and Type | Method and Description |
---|---|
protected abstract DoubleSignalSource |
choose()
Returns the chosen the input signal source for the current
value.
|
protected Consumer<CompilationContext> |
compileDefaultValue()
Returns a code generator for loading the default value of the signal type
on the operand stack.
|
double |
getAsDouble()
Returns the current value of this signal source.
|
alwaysThrow, compileConvertToInt, compileDataFlow, compileOrDefault, getCases, getSelector
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
abs, add, choose, choose, choose, choose, clock, compileDataFlow, compileMainSignalSource, constant, defined, delayed, delayed, delayedFeedback, delayedFeedback, divide, equal, getConstantAsDouble, getValueClass, glidingAverage, glidingStandardDeviation, glidingSum, glidingVariance, greaterOrEqual, greaterThan, guard, hasConstantAsDouble, invariant, lessOrEqual, lessThan, map, max, min, modulo, multiply, negate, negative, nonEqual, nonnegative, nonpositive, nonzero, notANumber, positive, power, probe, publishStoredValueVariable, relateWith, sampleAndHold, selectAffine, series, sqrt, stored, subtract, zero, zeroCrossing, zipWith
compileDataFlowTo, hasDataFlowIO
protected abstract DoubleSignalSource choose()
public double getAsDouble()
The value may be either computed on demand, or retrieved from storage.
Implementations of this method should have no side effect.
getAsDouble
in interface DoubleSignalSource
getAsDouble
in interface DoubleSupplier
protected Consumer<CompilationContext> compileDefaultValue()
AbstractSignalSourceChooser
compileDefaultValue
in class AbstractSignalSourceChooser