}
@Test
public void testMixedDerivatives() {
FieldHermiteInterpolator<BigFraction> interpolator = new FieldHermiteInterpolator<BigFraction>();
interpolator.addSamplePoint(new BigFraction(0), new BigFraction[] { new BigFraction(1) }, new BigFraction[] { new BigFraction(2) });
interpolator.addSamplePoint(new BigFraction(1), new BigFraction[] { new BigFraction(4) });
interpolator.addSamplePoint(new BigFraction(2), new BigFraction[] { new BigFraction(5) }, new BigFraction[] { new BigFraction(2) });
BigFraction[][] derivatives = interpolator.derivatives(new BigFraction(0), 5);
Assert.assertEquals(new BigFraction( 1), derivatives[0][0]);
Assert.assertEquals(new BigFraction( 2), derivatives[1][0]);
Assert.assertEquals(new BigFraction( 8), derivatives[2][0]);
Assert.assertEquals(new BigFraction(-24), derivatives[3][0]);
Assert.assertEquals(new BigFraction( 24), derivatives[4][0]);
Assert.assertEquals(new BigFraction( 0), derivatives[5][0]);
derivatives = interpolator.derivatives(new BigFraction(1), 5);
Assert.assertEquals(new BigFraction( 4), derivatives[0][0]);
Assert.assertEquals(new BigFraction( 2), derivatives[1][0]);
Assert.assertEquals(new BigFraction( -4), derivatives[2][0]);
Assert.assertEquals(new BigFraction( 0), derivatives[3][0]);
Assert.assertEquals(new BigFraction( 24), derivatives[4][0]);
Assert.assertEquals(new BigFraction( 0), derivatives[5][0]);
derivatives = interpolator.derivatives(new BigFraction(2), 5);
Assert.assertEquals(new BigFraction( 5), derivatives[0][0]);
Assert.assertEquals(new BigFraction( 2), derivatives[1][0]);
Assert.assertEquals(new BigFraction( 8), derivatives[2][0]);
Assert.assertEquals(new BigFraction( 24), derivatives[3][0]);
Assert.assertEquals(new BigFraction( 24), derivatives[4][0]);
Assert.assertEquals(new BigFraction( 0), derivatives[5][0]);
}