@Test public void simple() { // give it a function where one variable does not effect the output // to make the test more interesting SimpleFunction f = new SimpleFunction(); NumericalJacobianForward_DDRM alg = new NumericalJacobianForward_DDRM(f); DMatrixRMaj output = alg.declareMatrixMxN(); alg.process(new double[]{2,3,7},output); assertEquals(3, output.data[0], tol); assertEquals(-36, output.data[1], tol); assertEquals(0, output.data[2], tol); assertEquals(3, output.data[3], tol); assertEquals(2, output.data[4], tol); assertEquals(1, output.data[5], tol); }