Examples of integrate()


Examples of ca.nengo.dynamics.Integrator.integrate()

    TimeSeries input = new TimeSeriesImpl(new float[]{0f, .001f, .5f},
        new float[][]{new float[]{1, rl, 0f}, new float[]{0, rl, 0f}, new float[]{0, rl, 0f}},
        new Units[]{Units.UNK, Units.M, Units.M_PER_S});

    long startTime = System.currentTimeMillis();
    TimeSeries output = i.integrate(d, input);
    ourLogger.info("Elapsed time: " + (System.currentTimeMillis() - startTime));

    Plotter.plot(output, "Force");
  }
View Full Code Here

Examples of ca.nengo.dynamics.impl.EulerIntegrator.integrate()

    TimeSeries input = new TimeSeriesImpl(new float[]{0f, .001f, .5f},
        new float[][]{new float[]{1, rl, 0f}, new float[]{0, rl, 0f}, new float[]{0, rl, 0f}},
        new Units[]{Units.UNK, Units.M, Units.M_PER_S});

    long startTime = System.currentTimeMillis();
    TimeSeries output = i.integrate(d, input);
    ourLogger.info("Elapsed time: " + (System.currentTimeMillis() - startTime));

    Plotter.plot(output, "Force");
  }
View Full Code Here

Examples of ca.nengo.dynamics.impl.RK45Integrator.integrate()

  public void testIntegrate() {
    VanderPol system = new VanderPol(new float[]{.1f, .1f});
    Integrator integrator = new RK45Integrator();
    TimeSeries input = new TimeSeriesImpl(new float[]{0, 10f}, new float[][]{new float[0], new float[0]}, new Units[]{});
    TimeSeries result = integrator.integrate(system, input);
   
    assertTrue(result.getTimes().length < 60);
   
    //check results against selected hard-coded values from matlab solution ...
    InterpolatorND interpolator = new LinearInterpolatorND(result);
View Full Code Here

Examples of com.nr.fi.Adapt.integrate()

    Bessj1_Adapt bj1 = new Bessj1_Adapt();
    Adapt adp = new Adapt(0.0);
    for (i=0;i<N;i++) {
      x1=1.0*i;
      x2=x1+2.0;
      y[i]=adp.integrate(bj1,x1,x2);
      yy[i]=bj0.funk(x1)-bj0.funk(x2);
    }
    System.out.printf("Adapt: Maximum discrepancy = %f\n", maxel(vecsub(y,yy)));
    localflag = maxel(vecsub(y,yy)) > sbeps;
    globalflag = globalflag || localflag;
View Full Code Here

Examples of com.nr.ode.Odeint.integrate()

    y[0]=1.0; y[1]=1.0; y[2]=0.0;
    Output out=new Output(20);
    rhs_StepperRoss d = new rhs_StepperRoss();
    StepperRoss s = new StepperRoss();
    Odeint ode = new Odeint(y,x1,x2,atol,rtol,h1,hmin,out,d,s);
    ode.integrate();

    for (i=0;i<nvar;i++) {
      yout[i]=out.ysave[i][out.count-1];
//      System.out.printf(setprecision(12) << yout[i]);
    }
View Full Code Here

Examples of com.nr.ode.Odeint.integrate()

    y[0]=1.0; y[1]=1.0; y[2]=0.0;
    Output out=new Output(20);
    rhs_StepperSie d = new rhs_StepperSie();
    StepperSie s= new StepperSie();
    Odeint ode = new Odeint(y,x1,x2,atol,rtol,h1,hmin,out,d,s);
    ode.integrate();

    for (i=0;i<nvar;i++) {
      yout[i]=out.ysave[i][out.count-1];
//      System.out.printf(setprecision(12) << yout[i]);
    }
View Full Code Here

Examples of com.nr.ode.Odeint.integrate()

    Output out=new Output(20);
    x1=0.0;x2=1.0;
    rhs_StepperStoerm d = new rhs_StepperStoerm();
    StepperStoerm s1= new StepperStoerm();
    Odeint ode1 = new Odeint(y,x1,x2,atol,rtol,h1,hmin,out,d,s1);
    ode1.integrate();
    yexp[0]=bess.airy_ai(1.0);
    yexp[1]=bess.airy_bi(1.0);

    for (i=0;i<nvar;i++) {
      yout[i]=out.ysave[i][out.count-1];
View Full Code Here

Examples of com.nr.ode.Odeint.integrate()

    dydx[1]=0.0;

    x1=0.0;x2=-1.0;
    StepperStoerm s2 = new StepperStoerm();
    Odeint ode2 = new Odeint(y,x1,x2,atol,rtol,h1,hmin,out,d,s2);
    ode2.integrate();
    yexp[0]=bess.airy_ai(-1.0);
    yexp[1]=bess.airy_bi(-1.0);

    for (i=0;i<nvar;i++) {
      yout[i]=out.ysave[i][out.count-1];
View Full Code Here

Examples of com.nr.ode.Odeint.integrate()

    }
    Output out = new Output(20);
    rhs_StepperDopr5 d = new rhs_StepperDopr5();
    StepperDopr5 s = new StepperDopr5();
    Odeint ode = new Odeint(y,x1,x2,atol,rtol,h1,hmin,out,d,s);
    ode.integrate();

    for (i=0;i<nvar;i++) {
      yout[i]=out.ysave[i][out.count-1];
      System.out.printf("%f  %f\n", yout[i],yexp[i]);
    }
View Full Code Here

Examples of com.nr.ode.Odeint.integrate()

    yy[3]=y[1].im();
    Hypderiv d = new Hypderiv(a,b,c,z0,dz);
    Output out = new Output();
    StepperBS s = new StepperBS();
    Odeint ode =new Odeint(yy,0.0,1.0,atol,rtol,0.1,0.0,out,d,s);
    ode.integrate();
    y[0]=new Complex(yy[0],yy[1]);
    return y[0];
  }
 
  public static Complex hypgeo(final Complex a, final Complex b,final Complex c,
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.