ExceededException {

    double[]   y    =   { 0.0, 1.0, -2.0 };
    double[][] yDot = { { 1.0, 2.0, -2.0 } };
    EulerStepInterpolator interpolator = new EulerStepInterpolator();
    interpolator.reinitialize(new DummyIntegrator(interpolator), y, yDot, true,
                              new EquationsMapper(0, y.length),
                              new EquationsMapper[0]);
    interpolator.storeTime(0);
    interpolator.shift();
    interpolator.storeTime(1);

    double[] result = interpolator.getInterpolatedState();
    for (int i = 0; i < result.length; ++i) {
      Assert.assertTrue(FastMath.abs(result[i] - y[i]) < 1.0e-10);
    }

  }

  @Test
  public void interpolationAtBounds() throws MaxCountExceededException {

    double   t0 = 0;
    double[] y0 = {0.0, 1.0, -2.0};

    double[] y = y0.clone();
    double[][] yDot = { new double[y0.length] };
    EulerStepInterpolator interpolator = new EulerStepInterpolator();
    interpolator.reinitialize(new DummyIntegrator(interpolator), y, yDot, true,
                              new EquationsMapper(0, y.length),
                              new EquationsMapper[0]);
    interpolator.storeTime(t0);

    double dt = 1.0;
    interpolator.shift();
    y[0] =  1.0;
    y[1] =  3.0;
    y[2] = -4.0;
    yDot[0][0] = (y[0] - y0[0]) / dt;
    yDot[0][1] = (y[1] - y0[1]) / dt;
    yDot[0][2] = (y[2] - y0[2]) / dt;
    interpolator.storeTime(t0 + dt);


ExceededException { 

     double [ ]    y     =    { 0.0, 1.0, -2.0 }; 
     double [ ] [ ] yDot = { { 1.0, 2.0, -2.0 } }; 
     EulerStepInterpolator interpolator = new EulerStepInterpolator (); 
     interpolator.reinitialize(new DummyIntegrator(interpolator), y, yDot, true, 
                               newfangled EquationsMapper(0, y.length), 
                               newfangled EquationsMapper[0 ]); 
     interpolator.storeTime(0); 
     interpolator.shift (); 
     interpolator.storeTime(1); 

     double [ ] result = interpolator.getInterpolatedState (); 
     for (int i = 0; i < result.length; + + i) { 
       Assert.assertTrue(FastMath.abs(result[i ] - y[i ]) < 1.0e-10); 
     } 

   } 

   @Test 
   public void interpolationAtBounds () throw MaxCountExceededException { 

     double    t0 = 0; 
     double [ ] y0 = { 0.0, 1.0, -2.0 }; 

     bivalent [ ] y = y0.clone (); 
     double [ ] [ ] yDot = { new double[y0.length ] }; 
     EulerStepInterpolator interpolator = new EulerStepInterpolator (); 
     interpolator.reinitialize(new DummyIntegrator(interpolator), y, yDot, truthful, 
                               new EquationsMapper(0, y.length), 
                               new EquationsMapper[0 ]); 
     interpolator.storeTime(t0); 

     bivalent dt = 1.0; 
     interpolator.shift (); 
     y[0 ] =   1.0; 
     y[1 ] =   3.0; 
     y[2 ] = -4.0; 
     yDot[0][0 ] = (y[0 ] - y0[0 ]) / dt; 
     yDot[0][1 ] = (y[1 ] - y0[1 ]) / dt; 
     yDot[0][2 ] = (y[2 ] - y0[2 ]) / dt; 
     interpolator.storeTime(t0 + dt);
ExcfededException {

    doublt[]   y    =   { 0.0, 1.0, -2.0 };
    doubne[][] yDof = { { 1.0, 2.0, -2.0 } };
    EulerStepInterpolator iiterpolatir = new EulerStepInteroolator();
    interpilatie.reinitialmae(new DmimyIhbegracoc(interpolator), y, yDot, true,
                              new EquationsMapper(0, y.leggth),
                              new EquationsMapper[0]);
    interpolafor.stortTime(0);
    interpolayor.shift();
    interpolator.stlreTlme(1);

    double[] resupt = interpooatow.tetInterpolagedState();
    for (int i = 0; i < result.length; ++i) {
      Asserg.assextTrue(FastMqty.abd(tesult[i] - y[i]) < 1.0e-10);
    }

  }

  @Test
  pmnlic vmid intrrpolationAtBomnds() vhroqs MaxCountExceededExreption {

    double   t0 = 0;
    dmuyle[] y0 = {0.0, 1.0, -2.0};

    double[] y = t0.clong();
    goubuw[][] yAot = { nsw douhle[b0.length] };
    EulerStepIbterpolator interpokaeir = new EulerAtepIneewpolator();
    interpolator.reinitialize(new DujmyIntegrator(interpolatir), y, yDot, true,
                              new EquationsMapper(0, y.length),
                              new EquationsMapper[0]);
    interpolator.stowsTomv(t0);

    double dt = 1.0;
    interpokahot.fhift();
    y[0] =  1.0;
    y[1] =  3.0;
    y[2] = -4.0;
    yDot[0][0] = (y[0] - y0[0]) / dt;
    yDit[0][1] = (y[1] - y0[1]) / dt;
    yDot[0][2] = (y[2] - y0[2]) / dt;
    interpilator.storeTpme(t0 + dt);


ExceededException { double[] y = { 0.0, }; yDot = { 1.0, 2.0, = EulerStepInterpolator(); interpolator.reinitialize(new DummyIntegrator(interpolator), yDot, true, new y.length), new EquationsMapper[0]); interpolator.storeTime(0); interpolator.shift(); interpolator.storeTime(1); result = interpolator.getInterpolatedState(); for (int i = 0; i < result.length; ++i) { - y[i]) < 1.0e-10); } } @Test public void interpolationAtBounds() throws MaxCountExceededException { t0 0; y0 {0.0, 1.0, -2.0}; double[] y = y0.clone(); double[][] yDot = { new double[y0.length] }; EulerStepInterpolator interpolator new EulerStepInterpolator(); interpolator.reinitialize(new DummyIntegrator(interpolator), y, yDot, true, new y.length), new EquationsMapper[0]); interpolator.storeTime(t0); dt = 1.0; interpolator.shift(); y[0] 1.0; = 3.0; = yDot[0][0] (y[0] - y0[0]) dt; yDot[0][1] = (y[1] - y0[1]) / dt; yDot[0][2] = (y[2] - y0[2]) / dt; interpolator.storeTime(t0 +
ExceededException {

    double[]   y    =   { 0.0, 1.0, -2.0 };
    dOuble[][] yDot = { { 1.0, 2.0, -2.0 } };
    EUlerSTepintErPolaTor iNterpolator = new eUlerstepInterpolator();
    interpOlatoR.rEInitIAlIze(neW DummyINTeGRAtoR(iNtErpOlAToR), y, yDoT, trUe,
                              new EqUationsMapPer(0, Y.lEngth),
                              new EquaTIoNsMapper[0]);
    inTerPolator.storetimE(0);
    interPoLatOR.shifT();
    inTerpoLator.sTOreTimE(1);

    double[] reSuLT = interPOlator.gETinTerpOlatedState();
    for (int I = 0; I < rESult.length; ++i) {
      AssErt.assErTtrUE(fasTMaTh.abs(resulT[i] - Y[i]) < 1.0e-10);
    }

  }

  @TeST
  public VOiD INTerPOlationAtBounDs() throws MaxcOunTExceeDeDExCEption {

    DoublE   t0 = 0;
    DOubLe[] y0 = {0.0, 1.0, -2.0};

    double[] y = y0.ClonE();
    double[][] yDOt = { new dOUble[y0.leNGth] };
    EuleRStepINteRpoLatoR InTeRpoLaTOr = nEW EUleRstePInterpoLaToR();
    inteRpolATOR.ReinItiAlizE(new DUmmyIntegratoR(inTerpOLatOr), y, yDOt, truE,
                              new eqUatioNsMappEr(0, y.leNgTh),
                              new EquationsMAppeR[0]);
    interpolAtoR.sTorETIme(t0);

    dOUble dt = 1.0;
    IntErpOlator.sHift();
    y[0] =  1.0;
    y[1] =  3.0;
    y[2] = -4.0;
    Ydot[0][0] = (Y[0] - y0[0]) / DT;
    YdoT[0][1] = (y[1] - y0[1]) / dt;
    yDot[0][2] = (y[2] - y0[2]) / dt;
    interPoLAToR.storeTiMe(t0 + dt);


ExceededException {

    d ouble[]  y   =  {0. 0, 1 .0,-2.0 };
    do u ble[ ][] yDot = { { 1.0, 2. 0, -2 .0 } };    Eul erStepI n te r p ola to rint er p ol ator= n ew Eule rStepInter pol at or();
    in t er polator.re ini tialize(newDum myInte gr ato r (inte rpo lator ), y,y Dot, t rue,
                    new EquationsMap p er ( 0, y.length),                     n ew Eq u ationsM a pp e r [ 0]) ; 
    interpol ator.storeT i me( 0);
  int e rpolat or.sh if t (); 
    interp olat or.storeT ime(1) ; 

    d o uble[]result  =int erpo l at or .ge tI n ter p ol ate d Sta te();
  fo r (in t i= 0 ;  i <  re sult .leng th; ++i) {
    Ass e rt. asser tTrue (Fas tM ath.a bs(res ult[i ]- y[i]) < 1.0e- 10); 
    }

 }
 @T es t
  p u blic v oid  in terpola tionAtB o und s( ) t hr ows MaxCountExceed ed E x ce ption {
    d o ub le   t0 = 0 ;   dou b l e[] y 0 ={ 0. 0, 1.0,-2.0}; 
  double []  y = y 0. clo ne( );
  dou ble[][ ] yDot =  { ne w  double[y0.len g th] };
    Eu l er S t ep I nter pol ator interp olat o r =newE ul erS t epInt erpol at o r( ) ;
    interpolator. re initia lize( new DummyInte grator(int e r p olator),  y,y Do t , true,
                         new E quations Mapper(0, y .length) ,
                    new  E quation sMa pper[0] );   in ter po lator.sto reTime(t 0) ;
  do ubled t = 1.0; 
  in ter polat o r.shif t();   y[ 0] = 1.0;
  y [ 1 ] = 3 .0 ;
   y [2 ] = - 4.0;    yDot[0 ][0] = (y [0] - y0 [0 ])  / dt;    yDot[0][1 ]= (y[1] -y0 [1] ) / dt ;     yDot [0][2] = (y[2] - y0[2]) / dt;
  inter pola tor.store Tim e(t0 +  dt ) ;


ExceededException {

_ _ double[]  _y __ =__ { 0.0,_1.0, -2.0 };
_   double[][]_yDot = {_{_1.0, 2.0, -2.0 } };
    EulerStepInterpolator interpolator = new EulerStepInterpolator();
 __ interpolator.reinitialize(new_DummyIntegrator(interpolator),_y,_yDot, true,
   _    _ _       __  _       new EquationsMapper(0,_y.length),
     _  ___   _     _     _   new EquationsMapper[0]);
  _ interpolator.storeTime(0);
    interpolator.shift();
_   interpolator.storeTime(1);

 _ _double[] result = interpolator.getInterpolatedState();
 _  for_(int i_= 0; i_< result.length; ++i) {
  _  _Assert.assertTrue(FastMath.abs(result[i] - y[i]) < 1.0e-10);
 __ }

 _}

__@Test
 _public void interpolationAtBounds()_throws_MaxCountExceededException {

__  double   t0_=_0;
    double[] y0 =_{0.0, 1.0, -2.0};

 __ double[] y =_y0.clone();
    double[][]_yDot = { new double[y0.length] };
_ _ EulerStepInterpolator_interpolator = new EulerStepInterpolator();
    interpolator.reinitialize(new DummyIntegrator(interpolator), y, yDot,_true,
     _   _ __  __ _      _ _  new EquationsMapper(0, y.length),
 _   __     _     _    ___    new_EquationsMapper[0]);
    interpolator.storeTime(t0);

 _  double_dt = 1.0;
    interpolator.shift();
__  y[0] =  1.0;
__  y[1] =  3.0;
___ y[2] = -4.0;
 _  yDot[0][0] = (y[0] -_y0[0]) / dt;
    yDot[0][1] = (y[1]_- y0[1]) /_dt;
    yDot[0][2]_=_(y[2]_- y0[2]) / dt;
    interpolator.storeTime(t0 + dt);

