org.ddogleg.solver
Class FitQuadratic1D
- java.lang.Object
-
- org.ddogleg.solver.FitQuadratic1D
-
public class FitQuadratic1D extends java.lang.ObjectFits the coefficients for a quadratic polynomial to a set of even spaced data in an array.y = a*x2 + b*x + c
The coefficients (a,b,c) of the polynomial are found the solving a system of linear equations that minimizes the least squares error.
-
-
Constructor Summary
Constructors Constructor and Description FitQuadratic1D()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]getCoefficients()booleanprocess(int offset, int length, double... data)Computes polynomial coefficients for the given data.
-
-
-
Method Detail
-
process
public boolean process(int offset, int length, double... data)Computes polynomial coefficients for the given data.- Parameters:
length- Number of elements in data with relevant data.data- Set of observation data.- Returns:
- true if successful or false if it fails.
-
getCoefficients
public double[] getCoefficients()
- Returns:
- The coefficients [a,b,c]
-
-
DataMelt 3.0 © DataMelt by jWork.ORG