|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.torstennahm.integrate.sparse.ProductWeightIntegrator
public class ProductWeightIntegrator
Integrates a function by using product weights generated from a one-dimensional quadrature formula generator, with a depth specified seperately for each dimension.
This class is a helper class for sparse grid integration. It is not part of
the Integrator
hierarchy, as it does not support open-ended
integration, but only uses a fixed number of points.
This class is thread-safe.
Constructor Summary | |
---|---|
ProductWeightIntegrator(Generator generator)
Construct the integrator with the specified quadrature formula generator. |
Method Summary | |
---|---|
boolean |
canIntegrate(Index index)
Returns whether integration is possible with the given index. |
double |
integrateWithIndex(de.torstennahm.math.Function function,
Index index)
Integrates the function at the specified index by using the tensor product of one-dimensional quadrature formulas. |
double |
integrateWithNodes(de.torstennahm.math.Function function,
int[] nodes)
|
int |
neededEvaluations(Index index)
Returns the number of evaluations of the function needed for evaluation of the specified index. |
int |
neededEvaluations(int[] nodes)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ProductWeightIntegrator(Generator generator)
de.torstennahm.integrate.quadratureformula.GeneratorCache
before passing it to this class.
generator
- quadrature formula generatorMethod Detail |
---|
public double integrateWithIndex(de.torstennahm.math.Function function, Index index) throws IntegrationFailedException
index.getEntry(i)
will tell
the algorithm to use the quadrature formula returned by
getQuadratureFormulaByLevel(index.getEntry(i))
for the
dimension i
. In this way, the index specifies the
depth of integration for each dimension.
index
- integration index
IntegrationFailedException
- if an integration error occurspublic double integrateWithNodes(de.torstennahm.math.Function function, int[] nodes) throws IntegrationFailedException
IntegrationFailedException
public boolean canIntegrate(Index index)
index
-
true
if integration with this index is possiblepublic int neededEvaluations(Index index)
index
- integration index
public int neededEvaluations(int[] nodes)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |