|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jidesoft.chart.fit.QuadraticFitter
public class QuadraticFitter
A class that fits a quadratic polynomial curve to a set of points contained in a ChartModel
| Method Summary | |
|---|---|
DefaultChartModel |
createModel(Polynomial polynomial,
Range<?> xRange,
int numPoints)
|
AnnotatedChartModel |
createModel(String name,
Polynomial polynomial,
Double[] xs)
Sometimes you want a generated model to have exactly the same coordinates on the x axis as the original model. |
DefaultChartModel |
createModel(String name,
Polynomial polynomial,
Range<?> xRange,
int numPoints)
|
static QuadraticFitter |
getInstance()
Returns an instance of a QuadraticFitter. |
Polynomial |
performRegression(ChartModel model)
Start by creating a RealMatrix to store the coefficients double[][] coefficientsData = {{2, 3, -2}, {-1, 7, 6}, {4, -3, -5}}; RealMatrix coefficients = new RealMatrixImpl(coefficientsData); Next create a double[] array to represent the constant vector and use solve(double[]) to solve the system double[] constants = {1, -2, 1}; double[] solution = coefficients.solve(constants); |
AnnotatedChartModel |
performRegression(String name,
ChartModel model,
Range<?> xRange,
int numPoints)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static QuadraticFitter getInstance()
public Polynomial performRegression(ChartModel model)
performRegression in interface CurveFittermodel - the chart model over which to perform the regression
public DefaultChartModel createModel(Polynomial polynomial,
Range<?> xRange,
int numPoints)
createModel in interface CurveFitter
public AnnotatedChartModel createModel(String name,
Polynomial polynomial,
Double[] xs)
name - the name of the model to be generatedpolynomial - the polynomial of the curvexs - the x coordinates in the resulting ChartModel
public DefaultChartModel createModel(String name,
Polynomial polynomial,
Range<?> xRange,
int numPoints)
createModel in interface CurveFitter
public AnnotatedChartModel performRegression(String name,
ChartModel model,
Range<?> xRange,
int numPoints)
performRegression in interface CurveFitter
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||