Skip to content

Gauss-Hermite Quadrature - #1461

Open
JacobHass8 wants to merge 4 commits into
boostorg:developfrom
JacobHass8:hermite-quad
Open

Gauss-Hermite Quadrature#1461
JacobHass8 wants to merge 4 commits into
boostorg:developfrom
JacobHass8:hermite-quad

Conversation

@JacobHass8

Copy link
Copy Markdown
Contributor

Before continuing with this PR I wanted to get some feedback on the approach I took. For Gauss-Hermite quadrature, I need the roots of the Hermite polynomials. For small N, I found it's common to use the Golub-Welsch algorithm which finds the roots via the eigenvalues of a matrix. To find the eigenvalues, I used the Eigen library guarded behind a __has_include. I figured this was okay since I generated and saved the same abscissa/weights as was in gauss.hpp. @NAThompson do you have any thoughts?

If this is okay, I'll press on with writing some tests.

@NAThompson

Copy link
Copy Markdown
Collaborator

@JacobHass8 : Yeah, we've done guarded Eigen includes in this library many times. I think it's acceptable for sure.

@JacobHass8

Copy link
Copy Markdown
Contributor Author

I added root finding after the Golub-Welsch algorithm runs to further refine the roots. It doesn't look like the parameters moved that much. If someone tries to use higher N it might help. I did a couple of spot checks against Mathematica and the current values match to 100 digits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants