Package nz.org.riskscape.defaults.interp
Class BilinearContinuousFunctionType
java.lang.Object
nz.org.riskscape.defaults.interp.BilinearContinuousFunctionType
- All Implemented Interfaces:
nz.org.riskscape.engine.types.Type
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final nz.org.riskscape.defaults.interp.ContinuousFunctionType
static final BilinearContinuousFunctionType
protected final nz.org.riskscape.engine.types.Struct
protected final int
static final int
protected final nz.org.riskscape.engine.types.Type
The return type.static final int
protected final nz.org.riskscape.engine.rl.RealizedExpression
An expression to evaluate to plot the points of this curve type. -
Method Summary
Modifier and TypeMethodDescriptionCompute an interpolated y for a given xnz.org.riskscape.engine.types.Struct
asStruct()
protected boolean
boolean
int
estimateSize
(Object entry) int
nz.org.riskscape.engine.types.Type
The return type.nz.org.riskscape.engine.rl.RealizedExpression
An expression to evaluate to plot the points of this curve type.protected nz.org.riskscape.engine.types.Type
int
hashCode()
Class<?>
<T extends nz.org.riskscape.engine.types.Type>
booleanvoid
toBytes
(DataOutputStream os, Object toWrite) toString()
<T,
U> U visit
(nz.org.riskscape.engine.types.TypeVisitor<T, U> tv, T data) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.types.Type
checkForNull, find, findAllowNull, getUnwrappedType, isNullable, isNumeric, isWrapped, toString, unwrap
-
Field Details
-
ANY_BILINEAR
-
ONE_DIMENSIONAL
public static final int ONE_DIMENSIONAL- See Also:
-
TWO_DIMENSIONAL
public static final int TWO_DIMENSIONAL- See Also:
-
ANY
public static final nz.org.riskscape.defaults.interp.ContinuousFunctionType ANY -
dimensions
protected final int dimensions -
valueExpression
protected final nz.org.riskscape.engine.rl.RealizedExpression valueExpressionAn expression to evaluate to plot the points of this curve type. The expression will be evaluated with
ContinuousFunction#lamba
and values for each of the curves dimensions. -
returnType
protected final nz.org.riskscape.engine.types.Type returnTypeThe return type. Based on value expressions return type be should take account of interpolation.
-
asStruct
protected final nz.org.riskscape.engine.types.Struct asStruct
-
-
Method Details
-
applyTo
Compute an interpolated y for a given x
- Parameters:
func
- the function to interpolate a y value fordimensionValues
- a value for each of the dimensions this function accepts- Returns:
- a value corresponding to
#getYValueType()
-
visit
public <T,U> U visit(nz.org.riskscape.engine.types.TypeVisitor<T, U> tv, T data) - Specified by:
visit
in interfacenz.org.riskscape.engine.types.Type
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getValueType
protected nz.org.riskscape.engine.types.Type getValueType() -
asStruct
public nz.org.riskscape.engine.types.Struct asStruct()- Specified by:
asStruct
in interfacenz.org.riskscape.engine.types.Type
-
coerce
- Specified by:
coerce
in interfacenz.org.riskscape.engine.types.Type
- Throws:
nz.org.riskscape.engine.types.CoercionException
-
estimateSize
- Specified by:
estimateSize
in interfacenz.org.riskscape.engine.types.Type
-
fromBytes
- Specified by:
fromBytes
in interfacenz.org.riskscape.engine.types.Type
- Throws:
IOException
-
toBytes
- Specified by:
toBytes
in interfacenz.org.riskscape.engine.types.Type
- Throws:
IOException
-
internalType
- Specified by:
internalType
in interfacenz.org.riskscape.engine.types.Type
-
isA
- Specified by:
isA
in interfacenz.org.riskscape.engine.types.Type
-
getDimensions
public int getDimensions() -
getValueExpression
public nz.org.riskscape.engine.rl.RealizedExpression getValueExpression()An expression to evaluate to plot the points of this curve type. The expression will be evaluated with
ContinuousFunction#lamba
and values for each of the curves dimensions. -
getReturnType
public nz.org.riskscape.engine.types.Type getReturnType()The return type. Based on value expressions return type be should take account of interpolation.
-