FEJDMath
Class LinearFct1D

java.lang.Object
  extended byFEJDMath.ShapeFunction1D
      extended byFEJDMath.LinearFct1D

class LinearFct1D
extends ShapeFunction1D

Represents a 1D linear function


Constructor Summary
LinearFct1D(int a, int b)
          Makes a new LinearFct1D of the form: a + b*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

LinearFct1D

public LinearFct1D(int a,
                   int b)
Makes a new LinearFct1D of the form: a + b*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