static class DoubleSignalSourceChooser.OfInt extends DoubleSignalSourceChooser
DoubleSignalSourceChooser.OfEnum<E extends Enum<E>>, DoubleSignalSourceChooser.OfEnumInt<E extends Enum<E>>, DoubleSignalSourceChooser.OfInt| Constructor and Description |
|---|
OfInt(IntSignalSource selector,
DoubleSignalSource... cases) |
| Modifier and Type | Method and Description |
|---|---|
protected DoubleSignalSource |
choose()
Returns the chosen the input signal source for the current
value.
|
protected Consumer<CompilationContext> |
compileConvertToInt()
Returns a code generator for converting a value that represents the current
selection to an index of type
int. |
protected Map<Integer,Consumer<CompilationContext>> |
getCases(VariableContext.Variable result)
Returns a map with
int-indexed code generators for branches to
choose from. |
protected IntSignalSource |
getSelector()
Returns an entity that can be compiled to code that outputs a
value that represents the current selection.
|
compileDefaultValue, getAsDoublealwaysThrow, compileDataFlow, compileOrDefaultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitabs, 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, zipWithcompileDataFlowTo, hasDataFlowIO@SafeVarargs OfInt(IntSignalSource selector, DoubleSignalSource... cases)
protected DoubleSignalSource choose()
DoubleSignalSourceChooserchoose in class DoubleSignalSourceChooserprotected IntSignalSource getSelector()
AbstractSignalSourceChoosergetSelector in class AbstractSignalSourceChooserCompilableDataFlow.getValueClass()protected Map<Integer,Consumer<CompilationContext>> getCases(VariableContext.Variable result)
AbstractSignalSourceChooserint-indexed code generators for branches to
choose from. The returned map should contain an entry for every valid
index. The method AbstractSignalSourceChooser.compileOrDefault(eu.bandm.tools.lljava.live.VariableContext.Variable, eu.bandm.sig.adlib2.compile.CompilableDataFlow) may be used to populate the map.getCases in class AbstractSignalSourceChooserresult - the variable that all branches should output toAbstractSignalSourceChooser.compileConvertToInt()protected Consumer<CompilationContext> compileConvertToInt()
AbstractSignalSourceChooserint.compileConvertToInt in class AbstractSignalSourceChooser