|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.commons.math3.analysis.integration.gauss.BaseRuleFactory<T>
T - Type of the number used to represent the points and weights of
the quadrature rules.public abstract class BaseRuleFactory<T extends Number>
Base class for rules that determines the integration nodes and their
weights.
Subclasses must implement the computeRule method.
| Field Summary | |
|---|---|
private Map<Integer,Pair<T[],T[]>> |
pointsAndWeights
List of points and weights, indexed by the order of the rule. |
private Map<Integer,Pair<double[],double[]>> |
pointsAndWeightsDouble
Cache for double-precision rules. |
| Constructor Summary | |
|---|---|
BaseRuleFactory()
|
|
| Method Summary | ||
|---|---|---|
protected void |
addRule(Pair<T[],T[]> rule)
Stores a rule. |
|
protected abstract Pair<T[],T[]> |
computeRule(int numberOfPoints)
Computes the rule for the given order. |
|
private static
|
convertToDouble(Pair<T[],T[]> rule)
Converts the from the actual Number type to double |
|
Pair<double[],double[]> |
getRule(int numberOfPoints)
Gets a copy of the quadrature rule with the given number of integration points. |
|
protected Pair<T[],T[]> |
getRuleInternal(int numberOfPoints)
Gets a rule. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final Map<Integer,Pair<T extends Number[],T extends Number[]>> pointsAndWeights
private final Map<Integer,Pair<double[],double[]>> pointsAndWeightsDouble
| Constructor Detail |
|---|
public BaseRuleFactory()
| Method Detail |
|---|
public Pair<double[],double[]> getRule(int numberOfPoints)
throws NotStrictlyPositiveException,
DimensionMismatchException
numberOfPoints - Number of integration points.
NotStrictlyPositiveException - if numberOfPoints < 1.
DimensionMismatchException - if the elements of the rule pair do not
have the same length.
protected Pair<T[],T[]> getRuleInternal(int numberOfPoints)
throws DimensionMismatchException
numberOfPoints - Order of the rule to be retrieved.
DimensionMismatchException - if the elements of the rule pair do not
have the same length.
protected void addRule(Pair<T[],T[]> rule)
throws DimensionMismatchException
rule - Rule to be stored.
DimensionMismatchException - if the elements of the pair do not
have the same length.
protected abstract Pair<T[],T[]> computeRule(int numberOfPoints)
throws DimensionMismatchException
numberOfPoints - Order of the rule to be computed.
DimensionMismatchException - if the elements of the pair do not
have the same length.private static <T extends Number> Pair<double[],double[]> convertToDouble(Pair<T[],T[]> rule)
Number type to double
T - Type of the number used to represent the points and
weights of the quadrature rules.rule - Points and weights.
doubles.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||