ca.nengo.math.impl
Class Polynomial
java.lang.Object
ca.nengo.math.impl.AbstractFunction
ca.nengo.math.impl.Polynomial
- All Implemented Interfaces:
- Function, java.io.Serializable, java.lang.Cloneable
public class Polynomial
- extends AbstractFunction
- implements Function
A one-dimensional polynomial Function. It is defined by a series of coefficients that
must be given in the constructor.
- See Also:
- Serialized Form
Constructor Summary |
Polynomial(float[] coefficients)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Polynomial
public Polynomial(float[] coefficients)
- Parameters:
coefficients
- Coefficients [a0 a1 a2 ...] in polynomial y = a0 + a1x + a2x^2 + ...
getOrder
public int getOrder()
- Returns:
- Polynomial order
setOrder
public void setOrder(int order)
- Parameters:
order
- Polynomial order
getCoefficients
public float[] getCoefficients()
- Returns:
- Coefficients [a0 a1 a2 ...] in polynomial y = a0 + a1x + a2x^2 + ...
setCoefficients
public void setCoefficients(float[] coefficients)
- Parameters:
coefficients
- Coefficients [a0 a1 a2 ...] in polynomial y = a0 + a1x + a2x^2 + ...
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:
Function.map(float[])
clone
public Function 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