de.torstennahm.integrate.sparse
Class EvaluateIntegrator
java.lang.Object
de.torstennahm.integrate.Integrator<Evaluator>
de.torstennahm.integrate.sparse.EvaluateIntegrator
public class EvaluateIntegrator
- extends Integrator<Evaluator>
Sparse grid integrator that uses a hybrid of
non-adaptive simplicial and adaptive greedy strategies.
The controller will also intercalate indices from the standard simplex.
This increases robustness for difficult functions. The quota of
these simplicial indices may be set between 0 and 1. The quota
sets the relative amout of simplicial indices to be used. A quota
of 1 thus makes the controller default to standard non-adaptive
sparse grid integration.
Note that although the valid indices whose contributions have been
calculated are not formally part of the index set, their contributions
still are used for the integral value, as this can only improve
accuracy.
This class is thread-safe.
- Author:
- Torsten Nahm
- See Also:
Integrator
,
IntegrationResult
,
Evaluator
,
Visualizer
Field Summary |
protected double |
simplexQuota
Factor for balance between greedy and work |
Constructor Summary |
EvaluateIntegrator()
Constructs the weighted sparse integrator with the default settings. |
EvaluateIntegrator(double workQuota)
Construct the sparse integrator with the specified simplex quota. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
simplexQuota
protected final double simplexQuota
- Factor for balance between greedy and work
EvaluateIntegrator
public EvaluateIntegrator()
- Constructs the weighted sparse integrator with the default settings.
The constructor has the same result as using a simplex quota of 0.2
in
EvaluateIntegrator(double)
.
- See Also:
EvaluateIntegrator(double)
EvaluateIntegrator
public EvaluateIntegrator(double workQuota)
- Construct the sparse integrator with the specified simplex quota.
For work quota 0, only the calculated contribution for an index is used
(the greedy approach). For work quota 1, only indices in order of
increasing work are used. In many cases, this defaults to
standard non-adaptive sparse grid integration.
- Parameters:
workQuota
- quota of simplicial indices used, must be between 0 and 1
- Throws:
java.lang.IllegalArgumentException
- if the quota is out of range
integrate
public IntegrationResult integrate(Evaluator evaluator,
StopCondition condition,
java.util.List<Visualizer> visualizers)
throws IntegrationFailedException
- Description copied from class:
Integrator
- Performs numerical integration of the integrand until the given condition
is fulfilled.
- Specified by:
integrate
in class Integrator<Evaluator>
- Parameters:
evaluator
- object to be integratedcondition
- stop conditionvisualizers
- list of visualizers or null
for no visualization
- Returns:
- result of integration
- Throws:
IntegrationFailedException
- if an integration error occurs
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object