FEJDMath
Class BiquadraticFct

java.lang.Object
  extended byFEJDMath.ShapeFunction
      extended byFEJDMath.BiquadraticFct

class BiquadraticFct
extends ShapeFunction

Represents a 2D quadratic function


Constructor Summary
BiquadraticFct(int a, int b, int c, int d, int e, int f, int g, int h, int i)
          Makes a new QuadraticFct of the form: a + b*X + c*Y + d*X² + e*Y² + f*X*Y + g*X²*Y + h*X*Y² + i*X²*Y²
 
Method Summary
 double computeFctAt(double x, double y)
          Returns the value of the function at (x,y)
 Vector2 computeGradAt(double x, double y)
          Returns the value of the gradient of the function at (x,y)
 double getCoeffElem(int i)
          Returns the ith coefficient of the function
 void setCoeffElem(int i, double d)
          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

BiquadraticFct

public BiquadraticFct(int a,
                      int b,
                      int c,
                      int d,
                      int e,
                      int f,
                      int g,
                      int h,
                      int i)
Makes a new QuadraticFct of the form: a + b*X + c*Y + d*X² + e*Y² + f*X*Y + g*X²*Y + h*X*Y² + i*X²*Y²

Method Detail

computeGradAt

public Vector2 computeGradAt(double x,
                             double y)
Description copied from class: ShapeFunction
Returns the value of the gradient of the function at (x,y)

Specified by:
computeGradAt in class ShapeFunction

computeFctAt

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

Specified by:
computeFctAt in class ShapeFunction

toString

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

Specified by:
toString in class ShapeFunction

getCoeffElem

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


setCoeffElem

public void setCoeffElem(int i,
                         double d)
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