SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.functions.SquareMathFunction Class Reference

Represents a function computing \((af(x) + b)^2\) for a user-defined function \(f(x)\). More...

Inheritance diagram for umontreal.ssj.functions.SquareMathFunction:
umontreal.ssj.functions.MathFunctionWithFirstDerivative umontreal.ssj.functions.MathFunction

Public Member Functions

 SquareMathFunction (MathFunction func)
 Constructs a new square function for function func.
 SquareMathFunction (MathFunction func, double a, double b)
 Constructs a new power function for function func, and constants a and b.
MathFunction getFunction ()
 Returns the function \(f(x)\).
double getA ()
 Returns the value of \(a\).
double getB ()
 Returns the value of \(b\).
double evaluate (double x)
 Returns the value of the function evaluated at \(x\).
double derivative (double x)
 Computes (or estimates) the first derivative of the function at point x.

Detailed Description

Represents a function computing \((af(x) + b)^2\) for a user-defined function \(f(x)\).

Definition at line 33 of file SquareMathFunction.java.

Constructor & Destructor Documentation

◆ SquareMathFunction() [1/2]

umontreal.ssj.functions.SquareMathFunction.SquareMathFunction ( MathFunction func)

Constructs a new square function for function func.

The values of the constants are \(a=1\) and \(b=0\).

Parameters
functhe function \(f(x)\).

Definition at line 43 of file SquareMathFunction.java.

◆ SquareMathFunction() [2/2]

umontreal.ssj.functions.SquareMathFunction.SquareMathFunction ( MathFunction func,
double a,
double b )

Constructs a new power function for function func, and constants a and b.

Parameters
functhe function \(f(x)\).
athe multiplicative constant.
bthe additive constant.

Definition at line 55 of file SquareMathFunction.java.

Member Function Documentation

◆ derivative()

double umontreal.ssj.functions.SquareMathFunction.derivative ( double x)

Computes (or estimates) the first derivative of the function at point x.

Parameters
xthe point to evaluate the derivative to.
Returns
the value of the derivative.

Implements umontreal.ssj.functions.MathFunctionWithFirstDerivative.

Definition at line 95 of file SquareMathFunction.java.

◆ evaluate()

double umontreal.ssj.functions.SquareMathFunction.evaluate ( double x)

Returns the value of the function evaluated at \(x\).

Parameters
xvalue at which the function is evaluated
Returns
function evaluated at x

Implements umontreal.ssj.functions.MathFunction.

Definition at line 90 of file SquareMathFunction.java.

◆ getA()

double umontreal.ssj.functions.SquareMathFunction.getA ( )

Returns the value of \(a\).

Returns
the value of \(a\).

Definition at line 77 of file SquareMathFunction.java.

◆ getB()

double umontreal.ssj.functions.SquareMathFunction.getB ( )

Returns the value of \(b\).

Returns
the value of \(b\).

Definition at line 86 of file SquareMathFunction.java.

◆ getFunction()

MathFunction umontreal.ssj.functions.SquareMathFunction.getFunction ( )

Returns the function \(f(x)\).

Returns
the function.

Definition at line 68 of file SquareMathFunction.java.


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