org.apache.commons.math.ode.sampling.AbstractStepInterpolator Java Examples

The following examples show how to use org.apache.commons.math.ode.sampling.AbstractStepInterpolator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #2
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  }
}
 
Example #3
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #4
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      Assert.fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      Assert.assertEquals(0, ioe.getMessage().length());
  }
}
 
Example #5
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #6
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #7
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #8
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #9
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #10
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #11
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      Assert.fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      Assert.assertEquals(0, ioe.getMessage().length());
  }
}
 
Example #12
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #13
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #14
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #15
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}
 
Example #16
Source File: DummyStepInterpolatorTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test
public void testImpossibleSerialization()
throws IOException {

  double[] y = { 0.0, 1.0, -2.0 };
  AbstractStepInterpolator interpolator = new BadStepInterpolator(y, true);
  interpolator.storeTime(0);
  interpolator.shift();
  interpolator.storeTime(1);

  ByteArrayOutputStream bos = new ByteArrayOutputStream();
  ObjectOutputStream    oos = new ObjectOutputStream(bos);
  try {
      oos.writeObject(interpolator);
      fail("an exception should have been thrown");
  } catch (IOException ioe) {
      // expected behavior
      assertEquals(0, ioe.getMessage().length());
  } catch (Exception e) {
      fail("wrong exception caught");
  }

}