SSJ
V. labo.

umontreal.iro.lecuyer.functions
Class IdentityMathFunction

java.lang.Object
  extended by umontreal.iro.lecuyer.functions.IdentityMathFunction
All Implemented Interfaces:
MathFunction, MathFunctionWithDerivative, MathFunctionWithFirstDerivative, MathFunctionWithIntegral

public class IdentityMathFunction
extends Object
implements MathFunction, MathFunctionWithFirstDerivative, MathFunctionWithDerivative, MathFunctionWithIntegral

Represents the identity function f (x) = x.


Constructor Summary
IdentityMathFunction()
           
 
Method Summary
 double derivative(double x)
          Computes (or estimates) the first derivative of the function at point x.
 double derivative(double x, int n)
          .
 double evaluate(double x)
          Returns the value of the function evaluated at x.
 double integral(double a, double b)
          Computes (or estimates) the integral of the function over the interval [a, b].
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityMathFunction

public IdentityMathFunction()
Method Detail

evaluate

public double evaluate(double x)
Description copied from interface: MathFunction
Returns the value of the function evaluated at x.

Specified by:
evaluate in interface MathFunction
Parameters:
x - value at which the function is evaluated
Returns:
function evaluated at x

derivative

public double derivative(double x)
Description copied from interface: MathFunctionWithFirstDerivative
Computes (or estimates) the first derivative of the function at point x.

Specified by:
derivative in interface MathFunctionWithFirstDerivative
Parameters:
x - the point to evaluate the derivative to.
Returns:
the value of the derivative.

derivative

public double derivative(double x,
                         int n)
Description copied from interface: MathFunctionWithDerivative
. \begin{tabb}
 Computes (or estimates) the $n$th derivative
 of the function at p...
 ...hod{umontreal.iro.lecuyer.functions}{MathFunction}{evaluate}{double}.
 \end{tabb}
xthe point to evaluate the derivate to. nthe order of the derivative. the resulting derivative. IllegalArgumentExceptionif n is negative or 0.

Specified by:
derivative in interface MathFunctionWithDerivative

integral

public double integral(double a,
                       double b)
Description copied from interface: MathFunctionWithIntegral
Computes (or estimates) the integral of the function over the interval [a, b].

Specified by:
integral in interface MathFunctionWithIntegral
Parameters:
a - the starting point of the interval.
b - the ending point of the interval.
Returns:
the value of the integral.

SSJ
V. labo.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.