Package org.jamesii.core.math.complex

Examples of org.jamesii.core.math.complex.ComplexArray1D.subtract()


  public void testSubtractExceptions() {
    ComplexArray1D a = new ComplexArray1D(new Complex[] { new Complex(1, 1) });

    // testing subtract(int, double, double, double, double)
    try {
      a.subtract(-1, 3d, 4d, 1d, 2d);
      fail();
    } catch (IndexOutOfBoundsException e) {
      assertTrue(true);
    } catch (Exception e) {
      fail();
View Full Code Here


      assertTrue(true);
    } catch (Exception e) {
      fail();
    }
    try {
      a.subtract(5, 2d, 3d, 2d, 1d);
      fail();
    } catch (IndexOutOfBoundsException e) {
      assertTrue(true);
    } catch (Exception e) {
      fail();
View Full Code Here

      fail();
    }

    // testing subtract(int, int, double, double)
    try {
      a.subtract(-1, 0, 1d, 1d);
      fail();
    } catch (IndexOutOfBoundsException e) {
      assertTrue(true);
    } catch (Exception e) {
      fail();
View Full Code Here

      assertTrue(true);
    } catch (Exception e) {
      fail();
    }
    try {
      a.subtract(5, 0, 1d, 1d);
      fail();
    } catch (IndexOutOfBoundsException e) {
      assertTrue(true);
    } catch (Exception e) {
      fail();
View Full Code Here

      assertTrue(true);
    } catch (Exception e) {
      fail();
    }
    try {
      a.subtract(0, -2, 1d, 1d);
      fail();
    } catch (IndexOutOfBoundsException e) {
      assertTrue(true);
    } catch (Exception e) {
      fail();
View Full Code Here

      assertTrue(true);
    } catch (Exception e) {
      fail();
    }
    try {
      a.subtract(0, 10, 1d, 1d);
      fail();
    } catch (IndexOutOfBoundsException e) {
      assertTrue(true);
    } catch (Exception e) {
      fail();
View Full Code Here

      fail();
    }

    // testing subtract(int, double, double, int)
    try {
      a.subtract(-1, 1d, 1d, 0);
      fail();
    } catch (IndexOutOfBoundsException e) {
      assertTrue(true);
    } catch (Exception e) {
      fail();
View Full Code Here

      assertTrue(true);
    } catch (Exception e) {
      fail();
    }
    try {
      a.subtract(5, 1d, 1d, 0);
      fail();
    } catch (IndexOutOfBoundsException e) {
      assertTrue(true);
    } catch (Exception e) {
      fail();
View Full Code Here

      assertTrue(true);
    } catch (Exception e) {
      fail();
    }
    try {
      a.subtract(0, 1d, 1d, -2);
      fail();
    } catch (IndexOutOfBoundsException e) {
      assertTrue(true);
    } catch (Exception e) {
      fail();
View Full Code Here

      assertTrue(true);
    } catch (Exception e) {
      fail();
    }
    try {
      a.subtract(0, 1d, 1d, 10);
      fail();
    } catch (IndexOutOfBoundsException e) {
      assertTrue(true);
    } catch (Exception e) {
      fail();
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.