public interface Function
extends java.io.Serializable, java.lang.Cloneable
A mathematical function from an n-D space to a 1-D space. For simplicity we always map to a 1-D space, and model maps to n-D spaces with n Functions.
Instances of Function are immutable once they are created (ie their parameters do not change over time).
Modifier and Type | Method and Description |
---|---|
Function |
clone() |
int |
getDimension() |
float |
map(float[] from) |
float[] |
multiMap(float[][] from) |
int getDimension()
float map(float[] from)
from
- Must have same length as getDimension()float[] multiMap(float[][] from)
from
- An array of arguments; each element must have length getDimension().Function clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- if clone can't be made