|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Generator
This class generates quadrature formulas for given levels of integration. Subclasses each implement specific rules, such as the trapezoidal rule or the Clenshaw-Curtis rule.
Implementor's note: The generation of the quadrature formulas should be quick.
It is therefore recommended to use a cache for the quadrature formulas, so
they can be returned immediately. This may be done by subclassing
AbstractGeneratorCache
, which provides a framework for caching.
All subclasses are required to be thread-safe.
Method Summary | |
---|---|
QuadratureFormula |
getByLevel(int level)
This routine is similar to getByLevel , but here the argument
is only an abstract measure of the number of node-and-weight-pairs returned. |
QuadratureFormula |
getByNodes(int nodesRequested)
Returns a set of node-and-weight pairs in an QuadratureFormula
object. |
int |
maxLevel()
Returns the maximum argument supported by getByLevel . |
int |
maxNodes()
Returns the maximum argument supported by getByNodes . |
Method Detail |
---|
QuadratureFormula getByNodes(int nodesRequested)
QuadratureFormula
object. The number of nodes returned should be the same as those requested.
If this is not possible due to the special structure of the generator, the number
of nodes returned must be larger than that requested.
However, when 1 node is requested exactly 1 pair must be returned.
The number of nodes requested must be between 1 and getMaxNodes()
.
nodesRequested
- number of nodes for the quadrature formula
java.lang.IllegalArgumentException
- if the number of nodes requested is not in the valid rangeQuadratureFormula getByLevel(int level)
getByLevel
, but here the argument
is only an abstract measure of the number of node-and-weight-pairs returned.
In general, the number of weights should rise exponentially with the level.
However, the only conditions imposed it that the number of pairs should rise
strictly monotonously with the level. level
must be between
0 and getMaxLevel()
.
In the special case where level
is requested as 0, a quadrature formula
with exactly 1 pair must be returned.
level
- level of the quadrature formula
java.lang.IllegalArgumentException
- if the level is not in the valid rangeint maxNodes()
getByNodes
.
int maxLevel()
getByLevel
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |