Class DoubleExponentialRuleMatrixQuadrature

java.lang.Object
com.irurueta.numerical.integration.MatrixQuadrature
com.irurueta.numerical.integration.DoubleExponentialRuleMatrixQuadrature

public class DoubleExponentialRuleMatrixQuadrature extends MatrixQuadrature
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.
    • rows

      private final int rows
      Number of rows of quadrature result.
    • columns

      private final int columns
      Number of columns of quadrature result.
    • s

      private final com.irurueta.algebra.Matrix s
      Value of the next stage of refinement.
    • sum

      private final com.irurueta.algebra.Matrix sum
      Temporary value storing summation of evaluations.
    • tmpMid

      private final com.irurueta.algebra.Matrix tmpMid
      Temporary value storing evaluation at mid-point.
    • tmpA

      private final com.irurueta.algebra.Matrix tmpA
      Temporary value storing evaluation at lower bound.
    • tmpB

      private final com.irurueta.algebra.Matrix tmpB
      Temporary value storing evaluation at upper bound.
    • tmpX

      private final com.irurueta.algebra.Matrix tmpX
      Temporary value storing evaluation at point x.
    • listener

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

    • DoubleExponentialRuleMatrixQuadrature

      public DoubleExponentialRuleMatrixQuadrature(DoubleExponentialMatrixSingleDimensionFunctionEvaluatorListener listener, double a, double b, double hmax) throws com.irurueta.algebra.WrongSizeException
      Constructor.
      Parameters:
      listener - listener to evaluate a single dimension matrix function at required points.
      a - Lower limit of integration.
      b - Upper limit of integration.
      hmax - Maximum step size. This quadrature transforms the range of integration to [-hmax, hmax].
      Throws:
      com.irurueta.algebra.WrongSizeException - if size notified by provided listener is invalid.
    • DoubleExponentialRuleMatrixQuadrature

      public DoubleExponentialRuleMatrixQuadrature(DoubleExponentialMatrixSingleDimensionFunctionEvaluatorListener listener, double a, double b) throws com.irurueta.algebra.WrongSizeException
      Constructor.
      Parameters:
      listener - listener to evaluate a single dimension matrix function at required points.
      a - Lower limit of integration.
      b - Upper limit of integration.
      Throws:
      com.irurueta.algebra.WrongSizeException - if size notified by provided listener is invalid.
    • DoubleExponentialRuleMatrixQuadrature

      public DoubleExponentialRuleMatrixQuadrature(MatrixSingleDimensionFunctionEvaluatorListener listener, double a, double b, double hmax) throws com.irurueta.algebra.WrongSizeException
      Constructor.
      Parameters:
      listener - listener to evaluate a single dimension matrix function at required points.
      a - Lower limit of integration.
      b - Upper limit of integration.
      hmax - Maximum step size. This quadrature transforms the range of integration to [-hmax, hmax].
      Throws:
      com.irurueta.algebra.WrongSizeException - if size notified by provided listener is invalid.
    • DoubleExponentialRuleMatrixQuadrature

      public DoubleExponentialRuleMatrixQuadrature(MatrixSingleDimensionFunctionEvaluatorListener listener, double a, double b) throws com.irurueta.algebra.WrongSizeException
      Constructor.
      Parameters:
      listener - listener to evaluate a single dimension matrix function at required points.
      a - Lower limit of integration.
      b - Upper limit of integration.
      Throws:
      com.irurueta.algebra.WrongSizeException - if size notified by provided listener is invalid.
  • Method Details

    • next

      public void next(com.irurueta.algebra.Matrix result) throws EvaluationException
      Returns the value of the integral at the nth stage of refinement.
      Specified by:
      next in class MatrixQuadrature
      Parameters:
      result - instance where the value of the integral at the nth stage of refinement will be stored.
      Throws:
      EvaluationException - Raised if something failed during the evaluation.
    • getType

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

      protected int getRows()
      Gets number of rows of quadrature result.
      Specified by:
      getRows in class MatrixQuadrature
      Returns:
      number of rows of quadrature result.
    • getColumns

      protected int getColumns()
      Gets number of columns of quadrature result.
      Specified by:
      getColumns in class MatrixQuadrature
      Returns:
      number of columns of quadrature result.