public abstract class Function
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Function() |
Modifier and Type | Method and Description |
---|---|
static Function |
getFunction(java.lang.String name)
Get a built-in PMML Function.
|
static Function |
getFunction(java.lang.String name,
weka.core.pmml.TransformationDictionary transDict)
Get either a function.
|
java.lang.String |
getName() |
abstract Attribute |
getOutputDef()
Get the structure of the result produced by this function.
|
abstract java.lang.String[] |
getParameterNames()
Returns an array of the names of the parameters expected
as input by this function.
|
abstract double |
getResult(double[] incoming)
Get the result of applying this function.
|
abstract void |
setParameterDefs(java.util.ArrayList<Attribute> paramDefs)
Set the structure of the parameters that are expected as input by
this function.
|
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String pad) |
public java.lang.String getName()
public abstract java.lang.String[] getParameterNames()
public abstract void setParameterDefs(java.util.ArrayList<Attribute> paramDefs) throws java.lang.Exception
paramDefs
- the structure of the input parametersjava.lang.Exception
- if the number or types of parameters are not acceptable by
this functionpublic abstract Attribute getOutputDef()
public abstract double getResult(double[] incoming) throws java.lang.Exception
incoming
- the arguments to this function (supplied in order to match that
of the parameter definitionsjava.lang.Exception
- if there is a problem computing the result of this functionpublic static Function getFunction(java.lang.String name)
name
- the name of the function to get.public static Function getFunction(java.lang.String name, weka.core.pmml.TransformationDictionary transDict) throws java.lang.Exception
name
- the name of the function to get.transDict
- the TransformationDictionary (may be null if there is
no dictionary).java.lang.Exception
- if the named function is not known/supported.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String pad)