umontreal.iro.lecuyer.functions
Class IdentityMathFunction
- java.lang.Object
-
- umontreal.iro.lecuyer.functions.IdentityMathFunction
-
- All Implemented Interfaces:
- MathFunction, MathFunctionWithDerivative, MathFunctionWithFirstDerivative, MathFunctionWithIntegral
public class IdentityMathFunction extends java.lang.Object implements MathFunction, MathFunctionWithFirstDerivative, MathFunctionWithDerivative, MathFunctionWithIntegral
Represents the identity function f (x) = x.
-
-
Constructor Summary
Constructors Constructor and Description IdentityMathFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublederivative(double x)Computes (or estimates) the first derivative of the function at point x.doublederivative(double x, int n)Computes (or estimates) the nth derivative of the function at point x.doubleevaluate(double x)Returns the value of the function evaluated at x.doubleintegral(double a, double b)Computes (or estimates) the integral of the function over the interval [a, b].
-
-
-
Method Detail
-
evaluate
public double evaluate(double x)
Description copied from interface:MathFunctionReturns the value of the function evaluated at x.- Specified by:
evaluatein interfaceMathFunction- Parameters:
x- value at which the distribution function is evaluated- Returns:
- function evaluated at x
-
derivative
public double derivative(double x)
Description copied from interface:MathFunctionWithFirstDerivativeComputes (or estimates) the first derivative of the function at point x.- Specified by:
derivativein interfaceMathFunctionWithFirstDerivative- 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:MathFunctionWithDerivativeComputes (or estimates) the nth derivative of the function at point x. For n = 0, this returns the result ofevaluate.- Specified by:
derivativein interfaceMathFunctionWithDerivative- Parameters:
x- the point to evaluate the derivate to.n- the order of the derivative.- Returns:
- the resulting derivative.
-
integral
public double integral(double a, double b)Description copied from interface:MathFunctionWithIntegralComputes (or estimates) the integral of the function over the interval [a, b].- Specified by:
integralin interfaceMathFunctionWithIntegral- Parameters:
a- the starting point of the interval.b- the ending point of the interval.- Returns:
- the value of the integral.
-
-
DMelt 3.0 © DataMelt by jWork.ORG