|
SSJ V. labo. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.functions.AverageMathFunction
public class AverageMathFunction
Represents a function computing the average of several functions. Let f0(x),…, fn-1(x) be a set of n functions. This function represents the average
∑i=0n-1fi(x).
| Constructor Summary | |
|---|---|
AverageMathFunction(MathFunction... func)
Constructs a function computing the average of the functions in the array func. |
|
| Method Summary | |
|---|---|
double |
derivative(double x)
Computes (or estimates) the first derivative of the function at point x. |
double |
derivative(double x,
int n)
. |
double |
evaluate(double x)
Returns the value of the function evaluated at x. |
MathFunction[] |
getFunctions()
Returns the functions being averaged. |
double |
integral(double a,
double b)
Computes (or estimates) the integral of the function over the interval [a, b]. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AverageMathFunction(MathFunction... func)
func - the array of functions to average.| Method Detail |
|---|
public MathFunction[] getFunctions()
public double evaluate(double x)
MathFunction
evaluate in interface MathFunctionx - value at which the function is evaluated
public double derivative(double x,
int n)
MathFunctionWithDerivative
derivative in interface MathFunctionWithDerivativepublic double derivative(double x)
MathFunctionWithFirstDerivative
derivative in interface MathFunctionWithFirstDerivativex - the point to evaluate the derivative to.
public double integral(double a,
double b)
MathFunctionWithIntegral
integral in interface MathFunctionWithIntegrala - the starting point of the interval.b - the ending point of the interval.
|
SSJ V. labo. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||