Class IntegrandGenerator

java.lang.Object
org.drip.numerical.quadrature.IntegrandGenerator

public class IntegrandGenerator
extends java.lang.Object
IntegrandGenerator contains the Settings that enable the Generation of Integrand Quadrature and Weights for the Specified Orthogonal Polynomial Scheme. The References are:

  • Abramowitz, M., and I. A. Stegun (2007): Handbook of Mathematics Functions Dover Book on Mathematics
  • Gil, A., J. Segura, and N. M. Temme (2007): Numerical Methods for Special Functions Society for Industrial and Applied Mathematics Philadelphia
  • Press, W. H., S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery (2007): Numerical Recipes: The Art of Scientific Computing 3rd Edition Cambridge University Press New York
  • Stoer, J., and R. Bulirsch (2002): Introduction to Numerical Analysis 3rd Edition Springer
  • Wikipedia (2019): Gaussian Quadrature https://en.wikipedia.org/wiki/Gaussian_quadrature


Author:
Lakshmi Krishnamurthy
  • Constructor Details

    • IntegrandGenerator

      public IntegrandGenerator​(OrthogonalPolynomialSuite orthogonalPolynomialSuite, R1ToR1 weightFunction, double lowerBound, double upperBound) throws java.lang.Exception
      IntegrandGenerator Constructor
      Parameters:
      orthogonalPolynomialSuite - Orthogonal Polynomial Suite
      weightFunction - Weight Function
      lowerBound - Lower Bound
      upperBound - Upper Bound
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • GaussLegendre

      public static final IntegrandGenerator GaussLegendre​(OrthogonalPolynomialSuite orthogonalPolynomialSuite)
      Construct the Gauss-Legendre Integrand Quadrature Generator
      Parameters:
      orthogonalPolynomialSuite - Orthogonal Polynomial Suite
      Returns:
      The Gauss-Legendre Integrand Quadrature Generator
    • GaussJacobi

      public static final IntegrandGenerator GaussJacobi​(OrthogonalPolynomialSuite orthogonalPolynomialSuite, double alpha, double beta)
      Construct the Gauss-Jacobi Integrand Quadrature Generator
      Parameters:
      orthogonalPolynomialSuite - Orthogonal Polynomial Suite
      alpha - Jacobi Alpha
      beta - Jacobi Beta
      Returns:
      The Gauss-Jacobi Integrand Quadrature Generator
    • GaussChebyshevSecondKind

      public static final IntegrandGenerator GaussChebyshevSecondKind​(OrthogonalPolynomialSuite orthogonalPolynomialSuite)
      Construct the Gauss-Chebyshev (Second-Kind) Integrand Quadrature Generator
      Parameters:
      orthogonalPolynomialSuite - Orthogonal Polynomial Suite
      Returns:
      The Gauss-Chebyshev (Second-Kind) Integrand Quadrature Generator
    • GaussChebyshevFirstKind

      public static final IntegrandGenerator GaussChebyshevFirstKind​(OrthogonalPolynomialSuite orthogonalPolynomialSuite)
      Construct the Gauss-Chebyshev (First-Kind) Integrand Quadrature Generator
      Parameters:
      orthogonalPolynomialSuite - Orthogonal Polynomial Suite
      Returns:
      The Gauss-Chebyshev (First-Kind) Integrand Quadrature Generator
    • GaussLaguerre

      public static final IntegrandGenerator GaussLaguerre​(OrthogonalPolynomialSuite orthogonalPolynomialSuite)
      Construct the Gauss-Laguerre Integrand Quadrature Generator
      Parameters:
      orthogonalPolynomialSuite - Orthogonal Polynomial Suite
      Returns:
      The Gauss-Laguerre Integrand Quadrature Generator
    • GeneralizedGaussLaguerre

      public static final IntegrandGenerator GeneralizedGaussLaguerre​(OrthogonalPolynomialSuite orthogonalPolynomialSuite, double alpha)
      Construct the Generalized Gauss-Laguerre Integrand Quadrature Generator
      Parameters:
      orthogonalPolynomialSuite - Orthogonal Polynomial Suite
      alpha - Generalized Laguerre Alpha
      Returns:
      The Generalized Gauss-Laguerre Integrand Quadrature Generator
    • GaussHermite

      public static final IntegrandGenerator GaussHermite​(OrthogonalPolynomialSuite orthogonalPolynomialSuite)
      Construct the Gauss-Hermite Integrand Quadrature Generator
      Parameters:
      orthogonalPolynomialSuite - Orthogonal Polynomial Suite
      Returns:
      The Gauss-Hermite Integrand Quadrature Generator
    • orthogonalPolynomialSuite

      public OrthogonalPolynomialSuite orthogonalPolynomialSuite()
      Retrieve the Orthogonal Polynomial Suite
      Returns:
      The Orthogonal Polynomial Suite
    • weightFunction

      public R1ToR1 weightFunction()
      Retrieve the Weight Function
      Returns:
      The Weight Function
    • lowerBound

      public double lowerBound()
      Retrieve the Lower Integration Bound
      Returns:
      The Lower Integration Bound
    • upperBound

      public double upperBound()
      Retrieve the Upper Integration Bound
      Returns:
      The Upper Integration Bound
    • weightFunctionIntegral

      public double weightFunctionIntegral() throws java.lang.Exception
      Generate the Integral of the Weight Function Over the Bounds
      Returns:
      The Integral of the Weight Function Over the Bounds
      Throws:
      java.lang.Exception - Thrown if it cannot be computed
    • nodeWeight

      public double nodeWeight​(double x, int degree) throws java.lang.Exception
      Generate the Weight at the specified Node for the specified Orthogonal Polynomial
      Parameters:
      x - X Node
      degree - Orthogonal Polynomial Degree
      Returns:
      The Weight at the specified Node for the specified Orthogonal Polynomial
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • loadedInnerProduct

      public double loadedInnerProduct​(int degree1, int degree2) throws java.lang.Exception
      Compute the Loaded Inner Product between the Polynomial identified by their Degrees
      Parameters:
      degree1 - Polynomial Degree #1
      degree2 - Polynomial Degree #2
      Returns:
      The Loaded Inner Product
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • unloadedInnerProduct

      public double unloadedInnerProduct​(int degree1, int degree2) throws java.lang.Exception
      Compute the Unloaded Inner Product between the Polynomial identified by their Degrees
      Parameters:
      degree1 - Polynomial Degree #1
      degree2 - Polynomial Degree #2
      Returns:
      The Unloaded Inner Product
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • golubWelschA

      public double golubWelschA​(int degree) throws java.lang.Exception
      Generate the Golub-Welsch Matrix A Entry
      Parameters:
      degree - The Orthogonal Polynomial Degree
      Returns:
      The Golub-Welsch Matrix A Entry
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • golubWelschB

      public double golubWelschB​(int degree) throws java.lang.Exception
      Generate the Golub-Welsch Matrix B Entry
      Parameters:
      degree - The Orthogonal Polynomial Degree
      Returns:
      The Golub-Welsch Matrix B Entry
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • generateRecurrenceMatrix

      public GolubWelsch generateRecurrenceMatrix()
      Generate the Cross Polynomial Recurrence Matrix to be used in the Golub-Welsch Algorithm
      Returns:
      The Cross Polynomial Recurrence Matrix to be used in the Golub-Welsch Algorithm
    • gilSeguraTemme2007

      public Array2D gilSeguraTemme2007()
      Generate the Quadrature Nodes and Scaled Weights Using the Gil, Segura, and Temme (2007) Scheme
      Returns:
      The Quadrature Nodes and Scaled Weights