SSJ  3.3.1
Stochastic Simulation in Java
Public Member Functions | List of all members
MathFunctionWithDerivative Interface Reference

Represents a mathematical function whose \(n\)th derivative can be computed using derivative(double,int). More...

Inheritance diagram for MathFunctionWithDerivative:
[legend]
Collaboration diagram for MathFunctionWithDerivative:
[legend]

Public Member Functions

double derivative (double x, int n)
 Computes (or estimates) the \(n\)th derivative of the function at point x. More...
 
- Public Member Functions inherited from MathFunction
double evaluate (double x)
 Returns the value of the function evaluated at \(x\). More...
 

Detailed Description

Represents a mathematical function whose \(n\)th derivative can be computed using derivative(double,int).

Member Function Documentation

◆ derivative()

double derivative ( double  x,
int  n 
)

Computes (or estimates) the \(n\)th derivative of the function at point x.

For \(n=0\), this returns the result of umontreal.ssj.functions.MathFunction.evaluate(double).

Parameters
xthe point to evaluate the derivate to.
nthe order of the derivative.
Returns
the resulting derivative.
Exceptions
IllegalArgumentExceptionif n is negative or 0.

Implemented in BSpline, SmoothingCubicSpline, Polynomial, ShiftedMathFunction, AverageMathFunction, and IdentityMathFunction.


The documentation for this interface was generated from the following file: