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 RiskscapeFunction
s points, ranges and points.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
API For users to build theirDiscreteFunction
static class
A member of theDiscreteFunction
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final List<nz.org.riskscape.engine.types.Type>
Ranks numericType
s, such that a higher rankedType
can represent any of the lower rankedType
s.Fields inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
BUILT_IN
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscreteFunction.Builder
builder()
List<nz.org.riskscape.engine.types.Type>
getPairs()
nz.org.riskscape.engine.types.Type
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
builtin, getAggregationFunction, getArguments, getOverloaded, getRealizable, getTypesFromArguments, identified, identified, isA, setProblemReporter, validate
Methods inherited from interface nz.org.riskscape.engine.function.UntypedFunction
close
-
Field Details
-
NUMERIC_TYPE_RANK
Ranks numeric
Type
s, such that a higher rankedType
can represent any of the lower rankedType
s. TODO consider moving this to the NumberTypes enum
-
-
Method Details
-
builder
- Returns:
- a new
DiscreteFunction.Builder
for constructing aDiscreteFunction
.
-
call
- Specified by:
call
in interfacenz.org.riskscape.engine.function.UntypedFunction
-
getPairs
-
getArgumentTypes
- Specified by:
getArgumentTypes
in interfacenz.org.riskscape.engine.function.RiskscapeFunction
-
getReturnType
public nz.org.riskscape.engine.types.Type getReturnType()- Specified by:
getReturnType
in interfacenz.org.riskscape.engine.function.RiskscapeFunction
-