Package org.drip.numerical.quadrature
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 Summary
Constructors Constructor Description IntegrandGenerator(OrthogonalPolynomialSuite orthogonalPolynomialSuite, R1ToR1 weightFunction, double lowerBound, double upperBound)
IntegrandGenerator Constructor -
Method Summary
Modifier and Type Method Description static IntegrandGenerator
GaussChebyshevFirstKind(OrthogonalPolynomialSuite orthogonalPolynomialSuite)
Construct the Gauss-Chebyshev (First-Kind) Integrand Quadrature Generatorstatic IntegrandGenerator
GaussChebyshevSecondKind(OrthogonalPolynomialSuite orthogonalPolynomialSuite)
Construct the Gauss-Chebyshev (Second-Kind) Integrand Quadrature Generatorstatic IntegrandGenerator
GaussHermite(OrthogonalPolynomialSuite orthogonalPolynomialSuite)
Construct the Gauss-Hermite Integrand Quadrature Generatorstatic IntegrandGenerator
GaussJacobi(OrthogonalPolynomialSuite orthogonalPolynomialSuite, double alpha, double beta)
Construct the Gauss-Jacobi Integrand Quadrature Generatorstatic IntegrandGenerator
GaussLaguerre(OrthogonalPolynomialSuite orthogonalPolynomialSuite)
Construct the Gauss-Laguerre Integrand Quadrature Generatorstatic IntegrandGenerator
GaussLegendre(OrthogonalPolynomialSuite orthogonalPolynomialSuite)
Construct the Gauss-Legendre Integrand Quadrature Generatorstatic IntegrandGenerator
GeneralizedGaussLaguerre(OrthogonalPolynomialSuite orthogonalPolynomialSuite, double alpha)
Construct the Generalized Gauss-Laguerre Integrand Quadrature GeneratorGolubWelsch
generateRecurrenceMatrix()
Generate the Cross Polynomial Recurrence Matrix to be used in the Golub-Welsch AlgorithmArray2D
gilSeguraTemme2007()
Generate the Quadrature Nodes and Scaled Weights Using the Gil, Segura, and Temme (2007) Schemedouble
golubWelschA(int degree)
Generate the Golub-Welsch Matrix A Entrydouble
golubWelschB(int degree)
Generate the Golub-Welsch Matrix B Entrydouble
loadedInnerProduct(int degree1, int degree2)
Compute the Loaded Inner Product between the Polynomial identified by their Degreesdouble
lowerBound()
Retrieve the Lower Integration Bounddouble
nodeWeight(double x, int degree)
Generate the Weight at the specified Node for the specified Orthogonal PolynomialOrthogonalPolynomialSuite
orthogonalPolynomialSuite()
Retrieve the Orthogonal Polynomial Suitedouble
unloadedInnerProduct(int degree1, int degree2)
Compute the Unloaded Inner Product between the Polynomial identified by their Degreesdouble
upperBound()
Retrieve the Upper Integration BoundR1ToR1
weightFunction()
Retrieve the Weight Functiondouble
weightFunctionIntegral()
Generate the Integral of the Weight Function Over the BoundsMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
IntegrandGenerator
public IntegrandGenerator(OrthogonalPolynomialSuite orthogonalPolynomialSuite, R1ToR1 weightFunction, double lowerBound, double upperBound) throws java.lang.ExceptionIntegrandGenerator Constructor- Parameters:
orthogonalPolynomialSuite
- Orthogonal Polynomial SuiteweightFunction
- Weight FunctionlowerBound
- Lower BoundupperBound
- 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 Suitealpha
- Jacobi Alphabeta
- 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 Suitealpha
- 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
Retrieve the Orthogonal Polynomial Suite- Returns:
- The Orthogonal Polynomial Suite
-
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.ExceptionGenerate 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.ExceptionGenerate the Weight at the specified Node for the specified Orthogonal Polynomial- Parameters:
x
- X Nodedegree
- 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.ExceptionCompute the Loaded Inner Product between the Polynomial identified by their Degrees- Parameters:
degree1
- Polynomial Degree #1degree2
- 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.ExceptionCompute the Unloaded Inner Product between the Polynomial identified by their Degrees- Parameters:
degree1
- Polynomial Degree #1degree2
- 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.ExceptionGenerate 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.ExceptionGenerate 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
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
Generate the Quadrature Nodes and Scaled Weights Using the Gil, Segura, and Temme (2007) Scheme- Returns:
- The Quadrature Nodes and Scaled Weights
-