Class Scale
java.lang.Object
nz.org.riskscape.engine.function.BaseMathsFunction
nz.org.riskscape.engine.function.maths.Scale
- All Implemented Interfaces:
AutoCloseable,nz.org.riskscape.engine.function.IdentifiedFunction,nz.org.riskscape.engine.function.RiskscapeFunction,nz.org.riskscape.engine.function.UntypedFunction,nz.org.riskscape.engine.Identified,nz.org.riskscape.engine.rl.RealizableFunction
public class Scale
extends BaseMathsFunction
implements nz.org.riskscape.engine.function.IdentifiedFunction, nz.org.riskscape.engine.rl.RealizableFunction
Function that will return a scaled version of the first argument by the scale factor in the second argument.
This function is only applicable to numeric Typess. If the first argument is not numeric or is a
Struct with no numeric members then the function will not be realized.
In the case of Struct inputs only numeric members are scaled. Other non-numeric members
are left as is. This included any nested Struct e.g. any nested structs will not be scaled at all.
-
Nested Class Summary
Nested classes/interfaces inherited from interface nz.org.riskscape.engine.function.IdentifiedFunction
nz.org.riskscape.engine.function.IdentifiedFunction.Category, nz.org.riskscape.engine.function.IdentifiedFunction.WrappingNested classes/interfaces inherited from interface nz.org.riskscape.engine.rl.RealizableFunction
nz.org.riskscape.engine.rl.RealizableFunction.MetadataIdentifiedRealizableFunction -
Field Summary
Fields inherited from class nz.org.riskscape.engine.function.BaseMathsFunction
descriptionFields inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
BUILT_IN, LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnz.org.riskscape.engine.function.ArgumentListList<nz.org.riskscape.engine.types.Type>nz.org.riskscape.engine.types.Typenz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction>realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> argTypes) Methods inherited from class nz.org.riskscape.engine.function.BaseMathsFunction
call, getCategory, getDescription, getId, getSourceURI, wrapping, wrapping, wrappingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.Identified
getId, getIdentifiedClassMethods inherited from interface nz.org.riskscape.engine.function.IdentifiedFunction
getCategory, getDescription, getSource, getSourceURI, infoOutput, isBuiltin, toEntityMethods inherited from interface nz.org.riskscape.engine.rl.RealizableFunction
isDoTypeAdaptationMethods inherited from interface nz.org.riskscape.engine.function.RiskscapeFunction
builtin, close, getAggregationFunction, getOverloaded, getRealizable, getTypesFromArguments, identified, identified, isA, setProblemReporter, validateMethods inherited from interface nz.org.riskscape.engine.function.UntypedFunction
call
-
Constructor Details
-
Scale
public Scale()
-
-
Method Details
-
realize
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.function.RiskscapeFunction> realize(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.rl.ast.FunctionCall functionCall, List<nz.org.riskscape.engine.types.Type> argTypes) - Specified by:
realizein interfacenz.org.riskscape.engine.rl.RealizableFunction
-
getArguments
public nz.org.riskscape.engine.function.ArgumentList getArguments()- Specified by:
getArgumentsin interfacenz.org.riskscape.engine.function.RiskscapeFunction
-
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
-