de.torstennahm.integrate.quadratureformula
Class OpenTrapezoidal
java.lang.Object
de.torstennahm.integrate.quadratureformula.AbstractCachedGenerator
de.torstennahm.integrate.quadratureformula.OpenTrapezoidal
- All Implemented Interfaces:
- Generator
public class OpenTrapezoidal
- extends AbstractCachedGenerator
This class generates weights for the modified trapezoidal quadrature formula for
the open interval ]0,1[.
For n nodes, n>1, the nodes will lie at
1/(n+1), 2/(n+1), ..., n/(n+1).
The weights are 1/(n+1) for all internal nodes and
1.5/(n+1) for the first and the last node.
For n=1, the single (node, weight) pair is (0.5,1).
According to general Generator
contract, this class is thread-safe.
- Author:
- Torsten Nahm
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OpenTrapezoidal
public OpenTrapezoidal()
maxLevel
public int maxLevel()
- Description copied from interface:
Generator
- Returns the maximum argument supported by
getByLevel
.
- Returns:
- maximum level, or -1 for no maximum
maxNodes
public int maxNodes()
- Description copied from interface:
Generator
- Returns the maximum argument supported by
getByNodes
.
- Returns:
- maximum number of nodes, or -1 for no maximum
generateByLevel
public QuadratureFormula generateByLevel(int levelRequested)
- Specified by:
generateByLevel
in class AbstractCachedGenerator
generateByNodes
public QuadratureFormula generateByNodes(int nodesRequested)
- Specified by:
generateByNodes
in class AbstractCachedGenerator
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object