Class SymmetricFieldGaussIntegrator<T extends CalculusFieldElement<T>>
- java.lang.Object
 - 
- org.hipparchus.analysis.integration.gauss.FieldGaussIntegrator<T>
 - 
- org.hipparchus.analysis.integration.gauss.SymmetricFieldGaussIntegrator<T>
 
 
 
- 
- Type Parameters:
 T- Type of the field elements.
public class SymmetricFieldGaussIntegrator<T extends CalculusFieldElement<T>> extends FieldGaussIntegrator<T>
This class's implementsintegratemethod assuming that the integral is symmetric about 0. This allows to reduce numerical errors.- Since:
 - 2.0
 
 
- 
- 
Constructor Summary
Constructors Constructor Description SymmetricFieldGaussIntegrator(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.SymmetricFieldGaussIntegrator(T[] points, T[] weights)Creates an integrator from the givenpointsandweights. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tintegrate(CalculusFieldUnivariateFunction<T> f)Returns an estimate of the integral off(x) * w(x), wherewis a weight function that depends on the actual flavor of the Gauss integration scheme.- 
Methods inherited from class org.hipparchus.analysis.integration.gauss.FieldGaussIntegrator
getNumberOfPoints, getPoint, getWeight 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
SymmetricFieldGaussIntegrator
public SymmetricFieldGaussIntegrator(T[] points, T[] weights) throws MathIllegalArgumentException
Creates an integrator from the givenpointsandweights. The integration interval is defined by the first and last value ofpointswhich must be sorted in increasing order.- Parameters:
 points- Integration points.weights- Weights of the corresponding integration nodes.- Throws:
 MathIllegalArgumentException- if thepointsare not sorted in increasing order.MathIllegalArgumentException- if points and weights don't have the same length
 
- 
SymmetricFieldGaussIntegrator
public SymmetricFieldGaussIntegrator(Pair<T[],T[]> pointsAndWeights) throws MathIllegalArgumentException
Creates an integrator from the given pair of points (first element of the pair) and weights (second element of the pair.- Parameters:
 pointsAndWeights- Integration points and corresponding weights.- Throws:
 MathIllegalArgumentException- if thepointsare not sorted in increasing order.- See Also:
 SymmetricFieldGaussIntegrator(CalculusFieldElement[], CalculusFieldElement[])
 
 - 
 
- 
Method Detail
- 
integrate
public T integrate(CalculusFieldUnivariateFunction<T> f)
Returns an estimate of the integral off(x) * w(x), wherewis 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 theconstructor.- Overrides:
 integratein classFieldGaussIntegrator<T extends CalculusFieldElement<T>>- Parameters:
 f- Function to integrate.- Returns:
 - the integral of the weighted function.
 
 
 - 
 
 -