ca.nengo.math
Interface Function

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Subinterfaces:
DifferentiableFunction, FunctionBasis, PDF
All Known Implementing Classes:
AbstractFunction, AbstractRealLearningFunction, AbstractSpikeLearningFunction, ConstantFunction, Convolution, ErrorLearningFunction, ExponentialPDF, FourierFunction, FunctionBasisImpl, GaussianPDF, IdentityFunction, IndicatorPDF, InSpikeErrorFunction, LinearCurveFitter.InterpolatedFunction, LinearFunction, NumericallyDifferentiableFunction, NumericallyDifferentiableFunction.NumericalDerivative, OutSpikeErrorFunction, PiecewiseConstantFunction, PoissonPDF, Polynomial, PostfixFunction, RateFunctionSpikeGenerator.PoiraziDendriteSigmoid, RateFunctionSpikeGenerator.PoiraziSomaSigmoid, SigmoidFunction, SimpleFunctions.Acos, SimpleFunctions.Asin, SimpleFunctions.Atan, SimpleFunctions.Cos, SimpleFunctions.Exp, SimpleFunctions.Fold, SimpleFunctions.InverseNormal, SimpleFunctions.Ln, SimpleFunctions.Log10, SimpleFunctions.Log2, SimpleFunctions.Max, SimpleFunctions.Min, SimpleFunctions.Normal, SimpleFunctions.Pow, SimpleFunctions.Sin, SimpleFunctions.Sqrt, SimpleFunctions.Tan, SineFunction, TimeSeriesFunction

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).

Author:
Bryan Tripp

Method Summary
 Function clone()
           
 int getDimension()
           
 float map(float[] from)
           
 float[] multiMap(float[][] from)
           
 

Method Detail

getDimension

int getDimension()
Returns:
Dimension of the space that the Function maps from

map

float map(float[] from)
Parameters:
from - Must have same length as getDimension()
Returns:
result of function operation on arg

multiMap

float[] multiMap(float[][] from)
Parameters:
from - An array of arguments; each element must have length getDimension().
Returns:
Array of results of function operation on each arg

clone

Function clone()
               throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException