ca.nengo.util.impl
Class LinearInterpolatorND

java.lang.Object
  extended by ca.nengo.util.impl.LinearInterpolatorND
All Implemented Interfaces:
InterpolatorND, java.io.Serializable

public class LinearInterpolatorND
extends java.lang.Object
implements InterpolatorND

Interpolates linearly between adjacent values of a vector time series. TODO: test

Author:
Bryan Tripp
See Also:
Serialized Form

Constructor Summary
LinearInterpolatorND(TimeSeries series)
           
 
Method Summary
protected  LinearInterpolatorND clone()
           
 IndexFinder getFinder(float[] times)
          Uses a StatefulIndexFinder by default.
 float[] interpolate(float time)
           
 void setTimeSeries(TimeSeries series)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearInterpolatorND

public LinearInterpolatorND(TimeSeries series)
Parameters:
series - Series to interpolate
Method Detail

setTimeSeries

public void setTimeSeries(TimeSeries series)
Specified by:
setTimeSeries in interface InterpolatorND
See Also:
InterpolatorND.setTimeSeries(ca.nengo.util.TimeSeries)

interpolate

public float[] interpolate(float time)
Specified by:
interpolate in interface InterpolatorND
See Also:
InterpolatorND.interpolate(float)

getFinder

public IndexFinder getFinder(float[] times)
Uses a StatefulIndexFinder by default. Override to change this.

Parameters:
times - Times of time series
Returns:
IndexFinder on times

clone

protected LinearInterpolatorND clone()
                              throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException