FunctionUtils { public static double cube(final double x) { return x * x * x; } private  FunctionUtils(); static double square(final double x); static double cube(final double x); static int toTensorIndex(final int[] indices, final int[] dimensions); static int[] fromTensorIndex(final int index, final int[] dimensions); static double[] unique(final double[] in); static int[] unique(final int[] in); static int getLowerBoundIndex(final double[] set, final double value);  }
@Test public void testCube() { for (int i = 0; i < 100; i++) { final double x = Math.random(); assertEquals(FunctionUtils.cube(x), x * x * x, EPS); } }