FEJDMath
Class ShapeFunction

java.lang.Object
  extended byFEJDMath.ShapeFunction
Direct Known Subclasses:
BilinearFct, BiquadraticFct, LinearFct, QuadraticFct

abstract class ShapeFunction
extends java.lang.Object

Represents a 2D shape function, abstract class used to create the 2D functions we use


Field Summary
private  double[] coeffElem
          The coefficients of the function
 
Constructor Summary
(package private) ShapeFunction()
           
 
Method Summary
abstract  double computeFctAt(double x, double y)
          Returns the value of the function at (x,y)
abstract  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
abstract  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
 

Field Detail

coeffElem

private double[] coeffElem
The coefficients of the function

Constructor Detail

ShapeFunction

ShapeFunction()
Method Detail

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


computeGradAt

public abstract Vector2 computeGradAt(double x,
                                      double y)
Returns the value of the gradient of the function at (x,y)


computeFctAt

public abstract double computeFctAt(double x,
                                    double y)
Returns the value of the function at (x,y)


toString

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