Class DoubleExponentialRuleQuadrature

java.lang.Object
com.irurueta.numerical.integration.Quadrature
com.irurueta.numerical.integration.DoubleExponentialRuleQuadrature

public class DoubleExponentialRuleQuadrature extends Quadrature
Implementation of quadrature using double exponential, which allows integration with a variable transformation. This implementation is suitable for improper integrands containing singularities.
  • Field Details

    • DEFAULT_HMAX

      public static final double DEFAULT_HMAX
      Default transformation of range of integration.
      See Also:
    • a

      private final double a
      Lower limit of integration.
    • b

      private final double b
      Upper limit of integration.
    • hmax

      private final double hmax
      Maximum step size. Determines transformation of range of integration.
    • s

      private double s
      Value of the next stage of refinement.
    • listener

      Listener to evaluate single dimension functions at required points.
  • Constructor Details

    • DoubleExponentialRuleQuadrature

      public DoubleExponentialRuleQuadrature(DoubleExponentialSingleDimensionFunctionEvaluatorListener listener, double a, double b, double hmax)
      Constructor.
      Parameters:
      listener - listener to evaluate function and handle singularities.
      a - Lower limit of integration.
      b - Upper limit of integration.
      hmax - Maximum step size. This quadrature transforms the range of integration to [-hmax, hmax].
    • DoubleExponentialRuleQuadrature

      public DoubleExponentialRuleQuadrature(DoubleExponentialSingleDimensionFunctionEvaluatorListener listener, double a, double b)
      Constructor with default maximum step size.
      Parameters:
      listener - listener to evaluate function and handle singularities.
      a - Lower limit of integration.
      b - Upper limit of integration.
    • DoubleExponentialRuleQuadrature

      public DoubleExponentialRuleQuadrature(SingleDimensionFunctionEvaluatorListener listener, double a, double b, double hmax)
      Constructor.
      Parameters:
      listener - listener to evaluate function if function has mild singularities.
      a - Lower limit of integration.
      b - Upper limit of integration.
      hmax - Maximum step size. This quadrature transforms the range of integration to [-hmax, hmax].
    • DoubleExponentialRuleQuadrature

      public DoubleExponentialRuleQuadrature(SingleDimensionFunctionEvaluatorListener listener, double a, double b)
      Constructor with default maximum step size.
      Parameters:
      listener - listener to evaluate function if function has mild singularities.
      a - Lower limit of integration.
      b - Upper limit of integration.
  • Method Details

    • next

      public double next() throws EvaluationException
      Returns the value of the integral at the nth stage of refinement.
      Specified by:
      next in class Quadrature
      Returns:
      the value of the integral at the nth stage of refinement.
      Throws:
      EvaluationException - Raised if something failed during the evaluation.
    • getType

      public QuadratureType getType()
      Gets type of quadrature.
      Specified by:
      getType in class Quadrature
      Returns:
      type of quadrature.