Package ca.nengo.util

Examples of ca.nengo.util.InterpolatorND.interpolate()


    assertTrue(result.getTimes().length < 60);
   
    //check results against selected hard-coded values from matlab solution ...
    InterpolatorND interpolator = new LinearInterpolatorND(result);
    float tolerance = 0.005f;
    float[] time2 = interpolator.interpolate(2);
    TestUtil.assertClose(time2[0], 0.053f, tolerance);
    TestUtil.assertClose(time2[1], -0.157f, tolerance);
    float[] time5 = interpolator.interpolate(5);
    TestUtil.assertClose(time5[0], -0.128f, tolerance);
    TestUtil.assertClose(time5[1], 0.223f, tolerance);
View Full Code Here


    InterpolatorND interpolator = new LinearInterpolatorND(result);
    float tolerance = 0.005f;
    float[] time2 = interpolator.interpolate(2);
    TestUtil.assertClose(time2[0], 0.053f, tolerance);
    TestUtil.assertClose(time2[1], -0.157f, tolerance);
    float[] time5 = interpolator.interpolate(5);
    TestUtil.assertClose(time5[0], -0.128f, tolerance);
    TestUtil.assertClose(time5[1], 0.223f, tolerance);
    float[] time8 = interpolator.interpolate(8);
    TestUtil.assertClose(time8[0], 0.257f, tolerance);
    TestUtil.assertClose(time8[1], -0.297f, tolerance);
View Full Code Here

    TestUtil.assertClose(time2[0], 0.053f, tolerance);
    TestUtil.assertClose(time2[1], -0.157f, tolerance);
    float[] time5 = interpolator.interpolate(5);
    TestUtil.assertClose(time5[0], -0.128f, tolerance);
    TestUtil.assertClose(time5[1], 0.223f, tolerance);
    float[] time8 = interpolator.interpolate(8);
    TestUtil.assertClose(time8[0], 0.257f, tolerance);
    TestUtil.assertClose(time8[1], -0.297f, tolerance);
   
//    Plotter.plot(result, "Van der Pol Oscillator");
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.