Chart FX 7 for Java Server

com.softwarefx.chartfx.server.statistical
Class StudyPolynomialRegression

java.lang.Object
  extended by com.softwarefx.chartfx.server.statistical.Study
      extended by com.softwarefx.chartfx.server.statistical.StudyInteractive
          extended by com.softwarefx.chartfx.server.statistical.StudyLine
              extended by com.softwarefx.chartfx.server.statistical.StudyFormula
                  extended by com.softwarefx.chartfx.server.statistical.StudyPolynomialRegression
All Implemented Interfaces:
IStudy

public class StudyPolynomialRegression
extends StudyFormula
implements IStudy

Provides access to the StudyPolynomialRegression object.

This study determines the Polynomial Regression pattern of the data and draws a curve.


Constructor Summary
StudyPolynomialRegression()
           
 
Method Summary
 double evaluate(int seriesIndex, double x)
          Returns the value of the polynomial at a certain X value
 double[][] getCoefficients()
          Returns the coefficients of the polynomial equation for each series.
 int getDegree()
          Gets the Degree.
 String getValue(int series)
          Sets the value for a StudyCustom object.
 void setDegree(int value)
          Sets the degree of the polynomial.
 
Methods inherited from class com.softwarefx.chartfx.server.statistical.StudyFormula
getCurveMax, getCurveMin, getFormula, getSteps, getXMax, getXMin, isFillArea, isSpline, setFillArea, setFormula, setSpline, setSteps
 
Methods inherited from class com.softwarefx.chartfx.server.statistical.StudyLine
getColor, getLine, isBehind, setBehind
 
Methods inherited from class com.softwarefx.chartfx.server.statistical.StudyInteractive
getAxis, isInteractive, isVisible, setAxis, setInteractive, setVisible
 
Methods inherited from class com.softwarefx.chartfx.server.statistical.Study
createStudy, createStudy, createStudy, createStudy, createStudy, getDecimals, getID, getText, getValue, isBold, isIndented, setBold, setDecimals, setIndented, setText, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.softwarefx.chartfx.server.statistical.IStudy
getColor, getText, isBold, isIndented, isInteractive, isVisible, setBold, setIndented, setVisible
 

Constructor Detail

StudyPolynomialRegression

public StudyPolynomialRegression()
Method Detail

evaluate

public double evaluate(int seriesIndex,
                       double x)

Returns the value of the polynomial at a certain X value

Remarks:
  • If an X value is outside the visible range of the Chart area, then a value can still be calculated and will not cause an exception.

  • Parameters:
    seriesIndex - The series to analyze.
    x - The X Value.

    getCoefficients

    public double[][] getCoefficients()

    Returns the coefficients of the polynomial equation for each series.

    Remarks:
  • The number of coefficients is always 1 more than the Degree.


  • getDegree

    public int getDegree()

    Gets the Degree. For more detail see setDegree(int).


    getValue

    public String getValue(int series)

    Sets the value for a StudyCustom object.

    Remarks:
  • The Statistics.getStudies() property of the Statistics class allows you to obtain a selected study which exposes the members of this class. The Studies property may also be used to obain the entire StudiesCollection.

  • This property may only be used with StudyCustom objects, as other study objects will have precalcuated values based on the chart data. In order for a StudyCustom item to have a value, it must be configured.

  • Specified by:
    getValue in interface IStudy
    Overrides:
    getValue in class StudyLine
    See Also:
    Statistics.getStudies(), StudyCustom, StudiesCollection, Statistics

    setDegree

    public void setDegree(int value)

    Sets the degree of the polynomial.

    Remarks:
  • By default, a parabola is generated and applied to the statistical chart.


  • http://www.softwarefx.com

    2008 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.