Nengo.ca

ca.nengo.math.impl
Class Convolution

java.lang.Object
  extended by ca.nengo.math.impl.AbstractFunction
      extended by ca.nengo.math.impl.Convolution
All Implemented Interfaces:
Function, java.io.Serializable, java.lang.Cloneable

public class Convolution
extends AbstractFunction

A numerical convolution of two one-dimensional functions. TODO: unit tests

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ca.nengo.math.impl.AbstractFunction
DIMENSION_PROPERTY
 
Constructor Summary
Convolution(Function one, Function two, float stepSize, float window)
           
 
Method Summary
 Convolution clone()
           
 Function getFunctionOne()
           
 Function getFunctionTwo()
           
 float getStepSize()
           
 float getWindow()
           
 float map(float[] from)
           
 void setFunctionOne(Function function)
           
 void setFunctionTwo(Function function)
           
 void setStepSize(float stepSize)
           
 void setWindow(float window)
           
 
Methods inherited from class ca.nengo.math.impl.AbstractFunction
getCode, getDimension, getName, multiMap, setCode, setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Convolution

public Convolution(Function one,
                   Function two,
                   float stepSize,
                   float window)
Parameters:
one - First of two functions to convolve together
two - Second of two functions to convolve together
stepSize - Step size at which to numerically evaluate convolution integral
window - Window over which to evaluate convolution integral
Method Detail

getFunctionOne

public Function getFunctionOne()
Returns:
First of two functions to convolve together

setFunctionOne

public void setFunctionOne(Function function)
Parameters:
function - First of two functions to convolve together

getFunctionTwo

public Function getFunctionTwo()
Returns:
Second of two functions to convolve together

setFunctionTwo

public void setFunctionTwo(Function function)
Parameters:
function - Second of two functions to convolve together

getStepSize

public float getStepSize()
Returns:
Step size at which to numerically evaluate convolution integral

setStepSize

public void setStepSize(float stepSize)
Parameters:
stepSize - Step size at which to numerically evaluate convolution integral

getWindow

public float getWindow()
Returns:
Window over which to evaluate convolution integral

setWindow

public void setWindow(float window)
Parameters:
window - Window over which to evaluate convolution integral

map

public float map(float[] from)
Specified by:
map in interface Function
Specified by:
map in class AbstractFunction
Parameters:
from - Must have same length as getDimension()
Returns:
result of function operation on arg
See Also:
AbstractFunction.map(float[])

clone

public Convolution clone()
                  throws java.lang.CloneNotSupportedException
Specified by:
clone in interface Function
Overrides:
clone in class AbstractFunction
Returns:
Valid clone
Throws:
java.lang.CloneNotSupportedException - is super does not support clone

Nengo.ca