T
- Type of the field elements.public class FieldGaussIntegrator<T extends CalculusFieldElement<T>> extends Object
integrating
a weighted
function.Constructor and Description |
---|
FieldGaussIntegrator(Pair<T[],T[]> pointsAndWeights)
Creates an integrator from the given pair of points (first element of
the pair) and weights (second element of the pair.
|
FieldGaussIntegrator(T[] points,
T[] weights)
Creates an integrator from the given
points and weights . |
Modifier and Type | Method and Description |
---|---|
int |
getNumberOfPoints() |
T |
getPoint(int index)
Gets the integration point at the given index.
|
T |
getWeight(int index)
Gets the weight of the integration point at the given index.
|
T |
integrate(CalculusFieldUnivariateFunction<T> f)
Returns an estimate of the integral of
f(x) * w(x) ,
where w is a weight function that depends on the actual
flavor of the Gauss integration scheme. |
public FieldGaussIntegrator(T[] points, T[] weights) throws MathIllegalArgumentException
points
and weights
.
The integration interval is defined by the first and last value of
points
which must be sorted in increasing order.points
- Integration points.weights
- Weights of the corresponding integration nodes.MathIllegalArgumentException
- if the points
are not
sorted in increasing order.MathIllegalArgumentException
- if points and weights don't have the same lengthpublic FieldGaussIntegrator(Pair<T[],T[]> pointsAndWeights) throws MathIllegalArgumentException
pointsAndWeights
- Integration points and corresponding weights.MathIllegalArgumentException
- if the points
are not
sorted in increasing order.FieldGaussIntegrator(CalculusFieldElement[], CalculusFieldElement[])
public T integrate(CalculusFieldUnivariateFunction<T> f)
f(x) * w(x)
,
where w
is a weight function that depends on the actual
flavor of the Gauss integration scheme.
The algorithm uses the points and associated weights, as passed
to the constructor
.f
- Function to integrate.public int getNumberOfPoints()
public T getPoint(int index)
index
- index of the integration pointpublic T getWeight(int index)
index
- index of the integration pointCopyright © 2016-2021 CS GROUP. All rights reserved.