Class AccurateInterpolatingPolynomialEstimator
java.lang.Object
com.irurueta.numerical.interpolation.InterpolatingPolynomialEstimator
com.irurueta.numerical.interpolation.AccurateInterpolatingPolynomialEstimator
Estimates coefficients of a polynomial passing through provided set of x and y points.
This implementation is more accurate than other implementations such as implementations of
PolynomialEstimator.
Those implementations are based on curve fitting a polynomial of a given degree based on a number
of points that can be much larger than the number of points, which results in a polynomial that
does not exactly pass through provided points, but provides a minimum square error result.
On the other hand, this implementation builds a polynomial of order equal to the length of
provided x and y points.
Ths implementation is more accurate than SimpleInterpolatingPolynomialEstimator, at the
expense of greater computational cost (N^3 of this method vs N^2 of the simple one).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidestimate(double[] xa, double[] ya, double[] cof) Estimates polynomial coefficients from provided x and y points.Methods inherited from class com.irurueta.numerical.interpolation.InterpolatingPolynomialEstimator
estimate, estimate, estimateCoefficients
-
Constructor Details
-
AccurateInterpolatingPolynomialEstimator
public AccurateInterpolatingPolynomialEstimator()
-
-
Method Details
-
estimate
Estimates polynomial coefficients from provided x and y points.- Specified by:
estimatein classInterpolatingPolynomialEstimator- Parameters:
xa- x points the estimated polynomial passes through.ya- y points the estimated polynomial passes through.cof- instance where coefficients of estimated polynomial will be stored.- Throws:
IllegalArgumentException- if any of the provided values doesn't have the same length.InterpolationException- if interpolation fails for numerical reasons.
-