FEJDMath
Class QuadraticFct1D

java.lang.Object
  extended byFEJDMath.ShapeFunction1D
      extended byFEJDMath.QuadraticFct1D

class QuadraticFct1D
extends ShapeFunction1D

Represents a 1D quadratic function


Constructor Summary
QuadraticFct1D(int a, int b, int c)
          Makes a new QuadraticFct1D of the form: a + b*X + c*X²
 
Method Summary
 double computeFctAt(double x)
          Returns the value of the function at x
 double getCoeffElem(int i)
          Returns the ith coefficient of the function
 void setCoeffElem(int i, double value)
          Sets the ith coefficient of the function to value
 void setNbOfCoeff(int i)
          Sets the number of coefficients of the function to i
 java.lang.String toString()
          Returns a description of the function
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuadraticFct1D

public QuadraticFct1D(int a,
                      int b,
                      int c)
Makes a new QuadraticFct1D of the form: a + b*X + c*X²

Method Detail

computeFctAt

public double computeFctAt(double x)
Description copied from class: ShapeFunction1D
Returns the value of the function at x

Specified by:
computeFctAt in class ShapeFunction1D

toString

public java.lang.String toString()
Returns a description of the function

Specified by:
toString in class ShapeFunction1D

getCoeffElem

public double getCoeffElem(int i)
Returns the ith coefficient of the function


setCoeffElem

public void setCoeffElem(int i,
                         double value)
Sets the ith coefficient of the function to value


setNbOfCoeff

public void setNbOfCoeff(int i)
Sets the number of coefficients of the function to i