Package nz.org.riskscape.engine.function
Class DiscreteFunction
java.lang.Object
nz.org.riskscape.engine.function.DiscreteFunction
- All Implemented Interfaces:
AutoCloseable,nz.org.riskscape.engine.function.RiskscapeFunction,nz.org.riskscape.engine.function.UntypedFunction
public class DiscreteFunction
extends Object
implements nz.org.riskscape.engine.function.RiskscapeFunction
An RiskscapeFunction that allows a discrete function to be defined. Can be defined from a mix of constant
values and other RiskscapeFunctions points, ranges and points.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAPI For users to build theirDiscreteFunctionstatic classA member of theDiscreteFunction. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<nz.org.riskscape.engine.types.Type>Ranks numericTypes, such that a higher rankedTypecan represent any of the lower rankedTypes.Fields inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
BUILT_IN, LOG -
Method Summary
Modifier and TypeMethodDescriptionstatic DiscreteFunction.Builderbuilder()List<nz.org.riskscape.engine.types.Type>getPairs()nz.org.riskscape.engine.types.TypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
builtin, close, getAggregationFunction, getArguments, getOverloaded, getRealizable, getTypesFromArguments, identified, identified, isA, setProblemReporter, validate
-
Field Details
-
NUMERIC_TYPE_RANK
Ranks numeric
Types, such that a higher rankedTypecan represent any of the lower rankedTypes. TODO consider moving this to the NumberTypes enum
-
-
Method Details
-
builder
- Returns:
- a new
DiscreteFunction.Builderfor constructing aDiscreteFunction.
-
call
- Specified by:
callin interfacenz.org.riskscape.engine.function.UntypedFunction
-
getPairs
-
getArgumentTypes
- Specified by:
getArgumentTypesin interfacenz.org.riskscape.engine.function.RiskscapeFunction
-
getReturnType
public nz.org.riskscape.engine.types.Type getReturnType()- Specified by:
getReturnTypein interfacenz.org.riskscape.engine.function.RiskscapeFunction
-