Class DividedDifferences


  • public class DividedDifferences
    extends Object
    Divided differences is recursive division process for calculating the coefficients in the interpolation polynomial in the Newton form.
    See Also:
    Wikipedia: Divided differences
    • Constructor Detail

      • DividedDifferences

        public DividedDifferences​(OrderedPairs pairs)
        Construct divided differences from a given collection of ordered pairs.
        Parameters:
        pairs - the collection of ordered pairs
      • DividedDifferences

        public DividedDifferences​(SortedOrderedPairs sortedPairs)
        Construct divided differences from a given sorted collection of ordered pairs.
        Parameters:
        sortedPairs - the sorted collection of ordered pairs
    • Method Detail

      • getDifference

        public double getDifference​(int order)
        Get the divided difference of the given order.
        Parameters:
        order - the order of divided difference
        Returns:
        the divided difference
      • maxOrder

        public int maxOrder()
        Get the maximum order which is limited by the number of points given for the computation.
        Returns:
        the maximum order of difference