ca.nengo.math.impl
Class SineFunction
java.lang.Object
ca.nengo.math.impl.SineFunction
- All Implemented Interfaces:
- Function, java.io.Serializable, java.lang.Cloneable
public class SineFunction
- extends java.lang.Object
- implements Function
Function wrapper for sin(omega x), where x is in radians and omega is the angular frequency.
TODO: test
- Author:
- Bryan Tripp
- See Also:
- Serialized Form
Constructor Summary |
SineFunction()
Uses default angular frequency of 2pi and amplitude of 1 |
SineFunction(float omega)
Uses default amplitude of 1. |
SineFunction(float omega,
float amplitude)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SineFunction
public SineFunction()
- Uses default angular frequency of 2pi and amplitude of 1
SineFunction
public SineFunction(float omega)
- Uses default amplitude of 1.
- Parameters:
omega
- Angular frequency
SineFunction
public SineFunction(float omega,
float amplitude)
- Parameters:
omega
- Angular frequencyamplitude
- Amplitude (peak value)
getOmega
public float getOmega()
- Returns:
- Angular frequency
setOmega
public void setOmega(float omega)
- Parameters:
omega
- Angular frequency
getAmplitude
public float getAmplitude()
- Returns:
- Amplitude (peak value)
setAmplitude
public void setAmplitude(float amplitude)
- Parameters:
amplitude
- Amplitude (peak value)
getDimension
public int getDimension()
- Specified by:
getDimension
in interface Function
- Returns:
- 1
- See Also:
Function.getDimension()
map
public float map(float[] from)
- Specified by:
map
in interface Function
- Parameters:
from
- Must have same length as getDimension()
- Returns:
- result of function operation on arg
- See Also:
Function.map(float[])
multiMap
public float[] multiMap(float[][] from)
- Specified by:
multiMap
in interface Function
- Parameters:
from
- An array of arguments; each element must have length getDimension().
- Returns:
- Array of results of function operation on each arg
- See Also:
Function.multiMap(float[][])
clone
public Function clone()
throws java.lang.CloneNotSupportedException
- Specified by:
clone
in interface Function
- Overrides:
clone
in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException