Additional combinatorial functions and polynomials
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 839
- Forks
- 220
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 14
Description
This is a request for additional polynomial functions in Stan. I think it's as easy as wrapping boost functions from
boost sf_poly https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/math_toolkit/sf_poly/ the relevant hpp files are at https://github.com/boostorg/math/tree/develop/include/boost/math/special_functions.
That contains the following:
With derivatives
-
gegenbauer.html - jacobi.html
-
legendre.html -
chebyshev.html - cardinal_b_splines.html
Without
- legendre_stieltjes.html
- hermite.html
- sph_harm.html
- laguerre.html
A closed issue about chebyshev polynomials (issue 37 stan-dev) where the OP wrote it themselves and didn't need it in Stan.
I'm most interested in getting jacobi, legendre, hermite and laguerre.
Updates:
Legendre, Gegenbauer, and Chebyshev can all be derived from jacobi see https://people.sc.fsu.edu/~jburkardt/cpp_src/jacobi_polynomial/jacobi_polynomial.html.
Hermite polynomial has an easy derivative

Laguerre as well

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Boost's sf_poly documentation and the relevant headers in boost/math/special_functions. Compare the requested Jacobi, Legendre, Hermite, and Laguerre functions and their derivative requirements. Done means the prioritized polynomial functions are integrated into Stan Math with the requested derivative support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100