com.steema.teechart.functions
Class Polynom

java.lang.Object
  extended by com.steema.teechart.functions.Polynom

public class Polynom
extends java.lang.Object

Title: Polynom class

Description:

Copyright (c) 2005-2013 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL


Field Summary
static int maxDegree
           
 double[] polyCoeff
           
 
Constructor Summary
Polynom()
           
 
Method Summary
 int getPolyDegree()
          The number of degrees a polynomy will have.
 double polyEval(double x)
          Evaluate function by using polyDegree polynomial with polyCoeff at value x.
 void polyFit(int numPoints, double[] x, double[] y)
          Calculate the polynomial fit
 void setPolyDegree(int value)
          Sets the number of degrees a polynomy will have.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxDegree

public static int maxDegree

polyCoeff

public double[] polyCoeff
Constructor Detail

Polynom

public Polynom()
Method Detail

getPolyDegree

public int getPolyDegree()
The number of degrees a polynomy will have.
Warning:
With more degrees, more adjustment is achieved, however, values greater than 10 can slow the process.

Returns:
int

setPolyDegree

public void setPolyDegree(int value)
Sets the number of degrees a polynomy will have.
Warning:
With more degrees, more adjustment is achieved, however, values greater than 10 can slow the process.

Parameters:
value - int

polyFit

public void polyFit(int numPoints,
                    double[] x,
                    double[] y)
Calculate the polynomial fit

Parameters:
numPoints - int is the number of points to fit
x - double[] x values
y - double[] y values

polyEval

public double polyEval(double x)
Evaluate function by using polyDegree polynomial with polyCoeff at value x.

Parameters:
x - double
Returns:
double