public static void assertEquals( final String message, final Quaternion expected, final Quaternion actual, final NumberContext context) { TestUtils.assertEquals(message, (Number) expected, (Number) actual, context); TestUtils.assertEquals(message, (Access1D<?>) expected, (Access1D<?>) actual, context); }
public static void assertBounds( final Number lower, final Access1D<?> values, final Number upper, final NumberContext precision) { for (final Number tmpValue : values) { TestUtils.assertBounds(lower, tmpValue, upper, precision); } }
public static void assertEquals( final String message, final Access1D<?> expected, final Access1D<?> actual, final NumberContext context) { for (long i = 0; i < expected.count(); i++) { TestUtils.assertEquals(message + " @ " + i, expected.get(i), actual.get(i), context); } }
public void testACOSH() { TestUtils.assertEquals(ZERO, ACOSH.invoke(ONE), MACHINE_EPSILON); }
public static void assertEquals(final ComplexNumber expected, final ComplexNumber actual) { TestUtils.assertEquals(expected, actual, EQUALS); }
public static void assertEquals( final Access1D<?> expected, final Access1D<?> actual, final NumberContext context) { TestUtils.assertEquals("Access1D<?> != Access1D<?>", expected, actual, context); }
public static void assertEquals(final Access1D<?> expected, final Access1D<?> actual) { TestUtils.assertEquals(expected, actual, EQUALS); }
public static void assertEquals(final double expected, final double actual) { TestUtils.assertEquals(expected, actual, EQUALS); }
public void testPOWER() { TestUtils.assertEquals(ONE, POWER.invoke(ZERO, 0), MACHINE_EPSILON); TestUtils.assertEquals(ONE, POWER.invoke(PI, 0), MACHINE_EPSILON); TestUtils.assertEquals(ONE, POWER.invoke(E, 0), MACHINE_EPSILON); TestUtils.assertEquals(ZERO, POWER.invoke(ZERO, 1), MACHINE_EPSILON); TestUtils.assertEquals(PI, POWER.invoke(PI, 1), MACHINE_EPSILON); TestUtils.assertEquals(E, POWER.invoke(E, 1), MACHINE_EPSILON); TestUtils.assertEquals(ZERO * ZERO, POWER.invoke(ZERO, 2), MACHINE_EPSILON); TestUtils.assertEquals(PI * PI, POWER.invoke(PI, 2), MACHINE_EPSILON); TestUtils.assertEquals(E * E, POWER.invoke(E, 2), MACHINE_EPSILON); TestUtils.assertEquals(1 / ZERO, POWER.invoke(ZERO, -1), MACHINE_EPSILON); TestUtils.assertEquals(1 / PI, POWER.invoke(PI, -1), MACHINE_EPSILON); TestUtils.assertEquals(1 / E, POWER.invoke(E, -1), MACHINE_EPSILON); }
public static void assertEquals( final String message, final Number expected, final Number actual) { TestUtils.assertEquals(message, expected, actual, EQUALS); }
public static void assertEquals( final String message, final long[] expected, final long[] actual) { TestUtils.assertTrue(message, Arrays.equals(expected, actual)); }
public static void assertEquals( final Quaternion expected, final Quaternion actual, final NumberContext context) { TestUtils.assertEquals("Quaternion != Quaternion", expected, actual, context); }
public static void assertEquals( final Number expected, final Number actual, final NumberContext context) { TestUtils.assertEquals("Number != Number", expected, actual, context); }
public static void assertEquals(final long[] expected, final long[] actual) { TestUtils.assertEquals( Arrays.toString(expected) + " != " + Arrays.toString(actual), expected, actual); }
public static void assertEquals( final double expected, final double actual, final NumberContext context) { TestUtils.assertEquals("double != double", expected, actual, context); }
public void testASINH() { TestUtils.assertEquals(ZERO, ASINH.invoke(ZERO), MACHINE_EPSILON); }
public void testATANH() { TestUtils.assertEquals(ZERO, ATANH.invoke(ZERO), MACHINE_EPSILON); TestUtils.assertEquals(POSITIVE_INFINITY, ATANH.invoke(ONE), MACHINE_EPSILON); TestUtils.assertEquals(NEGATIVE_INFINITY, ATANH.invoke(NEG), MACHINE_EPSILON); }
public static void assertEquals( final String message, final Quaternion expected, final Quaternion actual) { TestUtils.assertEquals(message, expected, actual, EQUALS); }
public void testMinMax() { TestUtils.assertEquals(Math.min(2, -78), FunctionUtils.min(2, -78)); TestUtils.assertEquals(Math.max(2, -78), FunctionUtils.max(2, -78)); TestUtils.assertEquals(67, FunctionUtils.max(new int[] {67})); TestUtils.assertEquals(67, FunctionUtils.min(new int[] {67})); TestUtils.assertEquals(FunctionUtils.max(67, -76), FunctionUtils.max(new int[] {67, -76})); TestUtils.assertEquals(FunctionUtils.min(67, -76), FunctionUtils.min(new int[] {67, -76})); TestUtils.assertEquals( FunctionUtils.max(0, 67, -76), FunctionUtils.max(new int[] {0, 67, -76})); TestUtils.assertEquals( FunctionUtils.min(0, 67, -76), FunctionUtils.min(new int[] {0, 67, -76})); TestUtils.assertEquals( FunctionUtils.max(0, 67, -76, 80), FunctionUtils.max(new int[] {0, 67, -76, 80})); TestUtils.assertEquals( FunctionUtils.min(0, 67, -76, -80), FunctionUtils.min(new int[] {0, 67, -76, -80})); TestUtils.assertEquals( FunctionUtils.max(80, 0, 67, -76), FunctionUtils.max(new int[] {80, 0, 67, -76})); TestUtils.assertEquals( FunctionUtils.min(-80, 0, 67, -76), FunctionUtils.min(new int[] {-80, 0, 67, -76})); TestUtils.assertEquals(80, FunctionUtils.max(new int[] {0, 67, -76, 80})); TestUtils.assertEquals(-80, FunctionUtils.min(new int[] {0, 67, -76, -80})); TestUtils.assertEquals(80, FunctionUtils.max(new int[] {80, 0, 67, -76})); TestUtils.assertEquals(-80, FunctionUtils.min(new int[] {-80, 0, 67, -76})); }
public static void assertEquals( final double expected, final ComplexNumber actual, final NumberContext context) { TestUtils.assertEquals("ComplexNumber.re", expected, actual.doubleValue(), context); TestUtils.assertEquals("ComplexNumber.im", PrimitiveMath.ZERO, actual.i, context); }