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

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

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

Public Member Functions

 PowerMathFunction (MathFunction func, double power)
 Constructs a new power function for function func and power power.
 PowerMathFunction (MathFunction func, double a, double b, double power)
 Constructs a new power function for function func, power power, 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 getPower ()
 Returns the power \(p\).
double derivative (double x)
 Computes (or estimates) the first derivative of the function at point x.
double evaluate (double x)
 Returns the value of the function evaluated at \(x\).

Detailed Description

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

Definition at line 33 of file PowerMathFunction.java.

Constructor & Destructor Documentation

◆ PowerMathFunction() [1/2]

umontreal.ssj.functions.PowerMathFunction.PowerMathFunction ( MathFunction func,
double power )

Constructs a new power function for function func and power power.

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

Parameters
functhe function \(f(x)\).
powerthe power \(p\).

Definition at line 47 of file PowerMathFunction.java.

◆ PowerMathFunction() [2/2]

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

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

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

Definition at line 60 of file PowerMathFunction.java.

Member Function Documentation

◆ derivative()

double umontreal.ssj.functions.PowerMathFunction.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 105 of file PowerMathFunction.java.

◆ evaluate()

double umontreal.ssj.functions.PowerMathFunction.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 110 of file PowerMathFunction.java.

◆ getA()

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

Returns the value of \(a\).

Returns
the value of \(a\).

Definition at line 83 of file PowerMathFunction.java.

◆ getB()

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

Returns the value of \(b\).

Returns
the value of \(b\).

Definition at line 92 of file PowerMathFunction.java.

◆ getFunction()

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

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

Returns
the function.

Definition at line 74 of file PowerMathFunction.java.

◆ getPower()

double umontreal.ssj.functions.PowerMathFunction.getPower ( )

Returns the power \(p\).

Returns
the power.

Definition at line 101 of file PowerMathFunction.java.


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