Assert.assertEquals(81, FunctionUtils.compose(pow, pow).value(3), EPS);
}
@Test
public void testComposeDifferentiable() {
UnivariateDifferentiableFunction id = new Identity();
Assert.assertEquals(1, FunctionUtils.compose(id, id, id).value(new DerivativeStructure(1, 1, 0, 3)).getPartialDerivative(1), EPS);
UnivariateDifferentiableFunction c = new Constant(4);
Assert.assertEquals(0, FunctionUtils.compose(id, c).value(new DerivativeStructure(1, 1, 0, 3)).getPartialDerivative(1), EPS);
Assert.assertEquals(0, FunctionUtils.compose(c, id).value(new DerivativeStructure(1, 1, 0, 3)).getPartialDerivative(1), EPS);