Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Krawtchouk, Meixner, and Hahn polynomials #33393

Closed
tscrim opened this issue Feb 21, 2022 · 33 comments
Closed

Implement Krawtchouk, Meixner, and Hahn polynomials #33393

tscrim opened this issue Feb 21, 2022 · 33 comments

Comments

@tscrim
Copy link
Collaborator

tscrim commented Feb 21, 2022

These are three classes of orthogonal polynomials in
the Askey scheme.
We should provide an implementation based on
their definition as hypergeometric functions.

This ticket provides just a basic implementation with
no particular reason for the normalization choices.

CC: @dimpase @sagetrac-tmonteil @ferihr @fchapoton @mezzarobba @slel

Component: symbolics

Keywords: orthogonal polynomials

Author: Travis Scrimshaw

Branch/Commit: 9b40ec4

Reviewer: Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/33393

@tscrim tscrim added this to the sage-9.6 milestone Feb 21, 2022
@tscrim
Copy link
Collaborator Author

tscrim commented Feb 21, 2022

comment:1

An implementation of the Krawtchouk polynomials appear in coding/delsarte_bounds.py. I am cc-ing those people as they might be interested (at least for consistency such as normalization differences and/or possible cross-references). This code is likely slower as it is more general but I haven't checked.


New commits:

9b5f2e1Cleanup functions/orthogonal_polys.py.
6dca173Adding krawtchouk polynomials.
cb7a54cAdding Meixner polynomials; fixing some details with Krawtchouk.
9399347Implement Hahn polynomials.

@tscrim
Copy link
Collaborator Author

tscrim commented Feb 21, 2022

@tscrim

This comment has been minimized.

@tscrim
Copy link
Collaborator Author

tscrim commented Feb 21, 2022

Commit: 9399347

@fchapoton
Copy link
Contributor

comment:2

the "eval_recursive" should be cached (in parent ?), don't you think ?

@tscrim
Copy link
Collaborator Author

tscrim commented Feb 22, 2022

comment:3

There isn't really a parent per se. Since the input could be widely varied, it doesn't make so much sense to cache it (and could quick eat up memory). There might be some benefit to caching the resulting (generic) polynomial, but this would likely need a bit of refactoring.

@slel

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 27, 2022

Changed commit from 9399347 to b9f1eef

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 27, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

b9f1eefeval_recursive() is a method, not a function.

@tscrim
Copy link
Collaborator Author

tscrim commented Feb 27, 2022

comment:6

This fixes the pyflakes issues reported by the otherwise green patchbot.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 11, 2022

Changed commit from b9f1eef to cc6feca

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 11, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

f3e2af0Merge branch 'public/symbolics/more_orthogonal_polys-33393' of https://github.com/sagemath/sagetrac-mirror into public/symbolics/more_orthogonal_polys-33393
cc6fecaSome little documentation tweaks and improvements.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 11, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

2c45db3Some additional document improvements, including some more history.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 11, 2022

Changed commit from cc6feca to 2c45db3

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 14, 2022

comment:9

Patchbot is (morally) green.

@fchapoton
Copy link
Contributor

comment:10

ok

maybe one could add cross-references from and to the Krawtchouk polynomials in coding ?

@dimpase
Copy link
Member

dimpase commented Mar 14, 2022

comment:11

Replying to @fchapoton:

ok

maybe one could add cross-references from and to the Krawtchouk polynomials in coding ?

perhaps on a follow-up ticket?

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 15, 2022

Changed commit from 2c45db3 to b0154c5

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 15, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

7a20625Merge branch 'develop' into public/symbolics/more_orthogonal_polys-33393
b0154c5Adding crossrefs and a bit more documentation.

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 15, 2022

comment:13

I think that is a good idea to have crossrefs. I have added them along with an explicit test checking the relationship between the conventions.

@fchapoton
Copy link
Contributor

comment:14

ok, thenl let's go

@fchapoton
Copy link
Contributor

Reviewer: Frédéric Chapoton

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 15, 2022

comment:15

Thank you.

@vbraun
Copy link
Member

vbraun commented Mar 20, 2022

comment:16
[sagemath_doc_pdf-none] ? 
[sagemath_doc_pdf-none] ! Emergency stop.
[sagemath_doc_pdf-none]  ...                                              
[sagemath_doc_pdf-none]                                                   
[sagemath_doc_pdf-none] l.4558 They are named after Pafnuty Chebyshev (Ч
[sagemath_doc_pdf-none]                                                  ебышёв 1821\sphinxhyp...
[sagemath_doc_pdf-none] 

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 21, 2022

comment:17

It looks like the pdf doc doesn’t like Cyrillic so much; I thought it would be fine with the Russian tutorial. Do you know how to get that to work? If not, then we can just remove it.

@fchapoton
Copy link
Contributor

comment:18

just remove cyrillic

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 24, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

9b40ec4Remove Cyrillic from doc so pdf will compile.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 24, 2022

Changed commit from b0154c5 to 9b40ec4

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 24, 2022

comment:20

Removed.

@fchapoton
Copy link
Contributor

comment:22

did you check that pdf doc compiles ?

@tscrim
Copy link
Collaborator Author

tscrim commented Mar 27, 2022

comment:23

Yes, the pdf doc compiles for me.

@fchapoton
Copy link
Contributor

comment:24

Thanks, then let's move on

@vbraun
Copy link
Member

vbraun commented Mar 30, 2022

Changed branch from public/symbolics/more_orthogonal_polys-33393 to 9b40ec4

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

No branches or pull requests

5 participants