Class SimpleInterpolatingPolynomialEstimator
java.lang.Object
com.irurueta.numerical.interpolation.InterpolatingPolynomialEstimator
com.irurueta.numerical.interpolation.SimpleInterpolatingPolynomialEstimator
Estimates coefficients of a polynomial passing through provided set of x and y points.
This implementation is faster and 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.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
estimate
(double[] x, double[] y, 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
-
SimpleInterpolatingPolynomialEstimator
public SimpleInterpolatingPolynomialEstimator()
-
-
Method Details
-
estimate
public void estimate(double[] x, double[] y, double[] cof) Estimates polynomial coefficients from provided x and y points.- Specified by:
estimate
in classInterpolatingPolynomialEstimator
- Parameters:
x
- x points the estimated polynomial passes through.y
- 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.
-