T - Type of the field elements.public abstract class BaseAbstractFieldUnivariateIntegrator<T extends CalculusFieldElement<T>> extends Object implements FieldUnivariateIntegrator<T>
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_ABSOLUTE_ACCURACY
Default absolute accuracy.
|
static int |
DEFAULT_MAX_ITERATIONS_COUNT
Default maximal iteration count.
|
static int |
DEFAULT_MIN_ITERATIONS_COUNT
Default minimal iteration count.
|
static double |
DEFAULT_RELATIVE_ACCURACY
Default relative accuracy.
|
protected Incrementor |
iterations
The iteration count.
|
| Modifier | Constructor and Description |
|---|---|
protected |
BaseAbstractFieldUnivariateIntegrator(Field<T> field,
double relativeAccuracy,
double absoluteAccuracy)
Construct an integrator with given accuracies.
|
protected |
BaseAbstractFieldUnivariateIntegrator(Field<T> field,
double relativeAccuracy,
double absoluteAccuracy,
int minimalIterationCount,
int maximalIterationCount)
Construct an integrator with given accuracies and iteration counts.
|
protected |
BaseAbstractFieldUnivariateIntegrator(Field<T> field,
int minimalIterationCount,
int maximalIterationCount)
Construct an integrator with given iteration counts.
|
| Modifier and Type | Method and Description |
|---|---|
protected T |
computeObjectiveValue(T point)
Compute the objective function value.
|
protected abstract T |
doIntegrate()
Method for implementing actual integration algorithms in derived
classes.
|
double |
getAbsoluteAccuracy()
Get the absolute accuracy.
|
int |
getEvaluations()
Get the number of function evaluations of the last run of the integrator.
|
Field<T> |
getField()
Get the field to which function argument and value belong.
|
int |
getIterations()
Get the number of iterations of the last run of the integrator.
|
protected T |
getMax() |
int |
getMaximalIterationCount()
Get the upper limit for the number of iterations.
|
protected T |
getMin() |
int |
getMinimalIterationCount()
Get the min limit for the number of iterations.
|
double |
getRelativeAccuracy()
Get the relative accuracy.
|
T |
integrate(int maxEval,
CalculusFieldUnivariateFunction<T> f,
T lower,
T upper)
Integrate the function in the given interval.
|
protected void |
setup(int maxEval,
CalculusFieldUnivariateFunction<T> f,
T lower,
T upper)
Prepare for computation.
|
public static final double DEFAULT_ABSOLUTE_ACCURACY
public static final double DEFAULT_RELATIVE_ACCURACY
public static final int DEFAULT_MIN_ITERATIONS_COUNT
public static final int DEFAULT_MAX_ITERATIONS_COUNT
protected final Incrementor iterations
protected BaseAbstractFieldUnivariateIntegrator(Field<T> field, double relativeAccuracy, double absoluteAccuracy, int minimalIterationCount, int maximalIterationCount) throws MathIllegalArgumentException
The meanings of the various parameters are:
Precision.SAFE_MIN.field - field to which function argument and value belongrelativeAccuracy - relative accuracy of the resultabsoluteAccuracy - absolute accuracy of the resultminimalIterationCount - minimum number of iterationsmaximalIterationCount - maximum number of iterationsMathIllegalArgumentException - if minimal number of iterations
is not strictly positiveMathIllegalArgumentException - if maximal number of iterations
is lesser than or equal to the minimal number of iterationsprotected BaseAbstractFieldUnivariateIntegrator(Field<T> field, double relativeAccuracy, double absoluteAccuracy)
field - field to which function argument and value belongrelativeAccuracy - relative accuracy of the resultabsoluteAccuracy - absolute accuracy of the resultprotected BaseAbstractFieldUnivariateIntegrator(Field<T> field, int minimalIterationCount, int maximalIterationCount) throws MathIllegalArgumentException
field - field to which function argument and value belongminimalIterationCount - minimum number of iterationsmaximalIterationCount - maximum number of iterationsMathIllegalArgumentException - if minimal number of iterations
is not strictly positiveMathIllegalArgumentException - if maximal number of iterations
is lesser than or equal to the minimal number of iterationspublic Field<T> getField()
public double getRelativeAccuracy()
getRelativeAccuracy in interface FieldUnivariateIntegrator<T extends CalculusFieldElement<T>>public double getAbsoluteAccuracy()
getAbsoluteAccuracy in interface FieldUnivariateIntegrator<T extends CalculusFieldElement<T>>public int getMinimalIterationCount()
getMinimalIterationCount in interface FieldUnivariateIntegrator<T extends CalculusFieldElement<T>>public int getMaximalIterationCount()
getMaximalIterationCount in interface FieldUnivariateIntegrator<T extends CalculusFieldElement<T>>public int getEvaluations()
getEvaluations in interface FieldUnivariateIntegrator<T extends CalculusFieldElement<T>>public int getIterations()
getIterations in interface FieldUnivariateIntegrator<T extends CalculusFieldElement<T>>protected T getMin()
protected T getMax()
protected T computeObjectiveValue(T point) throws MathIllegalStateException
point - Point at which the objective function must be evaluated.MathIllegalStateException - if the maximal number of function
evaluations is exceeded.protected void setup(int maxEval,
CalculusFieldUnivariateFunction<T> f,
T lower,
T upper)
throws MathIllegalArgumentException,
NullArgumentException
solve methods.maxEval - Maximum number of evaluations.f - the integrand functionlower - the min bound for the intervalupper - the upper bound for the intervalNullArgumentException - if f is null.MathIllegalArgumentException - if min >= max.public T integrate(int maxEval, CalculusFieldUnivariateFunction<T> f, T lower, T upper) throws MathIllegalArgumentException, MathIllegalStateException, NullArgumentException
integrate in interface FieldUnivariateIntegrator<T extends CalculusFieldElement<T>>maxEval - Maximum number of evaluations.f - the integrand functionlower - the lower bound for the intervalupper - the upper bound for the intervalMathIllegalArgumentException - if min > max or the endpoints do not
satisfy the requirements specified by the integratorMathIllegalStateException - if the maximum number of function
evaluations is exceededNullArgumentException - if f is null.protected abstract T doIntegrate() throws MathIllegalStateException
MathIllegalStateException - if the maximal number of evaluations
is exceeded.MathIllegalStateException - if the maximum iteration count is exceeded
or the integrator detects convergence problems otherwiseCopyright © 2016-2022 CS GROUP. All rights reserved.