SSJ  3.3.1
Stochastic Simulation in Java
Public Member Functions | Package Attributes | List of all members
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 PowerMathFunction:
[legend]
Collaboration diagram for PowerMathFunction:
[legend]

Public Member Functions

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

Package Attributes

double b
 

Detailed Description

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

Constructor & Destructor Documentation

◆ PowerMathFunction() [1/2]

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\).

◆ PowerMathFunction() [2/2]

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.

Member Function Documentation

◆ derivative()

double 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 MathFunctionWithFirstDerivative.

◆ evaluate()

double 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 MathFunction.

◆ getA()

double getA ( )

Returns the value of \(a\).

Returns
the value of \(a\).

◆ getB()

double getB ( )

Returns the value of \(b\).

Returns
the value of \(b\).

◆ getFunction()

MathFunction getFunction ( )

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

Returns
the function.

◆ getPower()

double getPower ( )

Returns the power \(p\).

Returns
the power.

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