Support stieltjes/cauchy of ChebyshevT via Legendre - #68
Open
dlfivefifty wants to merge 1 commit into
Open
dlfivefifty wants to merge 1 commit into
dlfivefifty wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #68 +/- ##
==========================================
+ Coverage 91.79% 92.32% +0.53%
==========================================
Files 4 4
Lines 317 365 +48
==========================================
+ Hits 291 337 +46
- Misses 26 28 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
stieltjes(J::AbstractJacobi, z) = stieltjes(Legendre(), z) * (Legendre() \ J) already covers ChebyshevT; the LazyArrays fixes for triangular inverses make indexing rows of this lazy product (and of cauchy) finite. Add tests, generalise the StieltjesPoints simplify rule from Legendre to AbstractJacobi and require LazyArrays 2.14.3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dlfivefifty
force-pushed
the
chebyshevt-stieltjes
branch
from
September 30, 2026 13:34
69c7331 to
f5d5eba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This drops the explicit-formula approach.
stieltjes(J::AbstractJacobi, z) = stieltjes(Legendre(), z) * (Legendre() \ J)already coversChebyshevT, andcauchydivides that lazy product by-2πi. The problem was that indexing rows of the product, e.g.stieltjes(ChebyshevT(), 2+im)[1,1:10]or anything fromcauchy(ChebyshevT(), z), stalled inside LazyArrays. The fixes are upstream:transpose/adjointofinv(UpperTriangular(...))keep the triangular structure (JuliaArrays/LazyArrays.jl@913b6ac). The row indexing of a product transposes its factors, so this gives it the correctrowsupport.DualLayoutlazy product broadcasts lazily, socauchy's scalar division no longer materialises (913b6ac).With those in place,
cauchy(ChebyshevT(), 2+im)[1,1:1000]takes about 0.05s.Changes in this PR:
stieltjes/cauchyofChebyshevT: against quadrature, against the inhomogeneous three-term recurrence, on the interval with±0im, for expansions, for vectors of points, and for mappedchebyshevt(0..2).StieltjesPoints * Legendresimplify rule becomesStieltjesPoints * AbstractJacobi, soinv.(zs .- x') * ChebyshevT()works too.LazyArrays = "2.14.3", and the version is bumped to 0.4.2.CI will fail until LazyArrays 2.14.3 is released with both fixes. The full test suite passes locally with those fixes applied to LazyArrays v2.14.1.
Still not working through this route:
ChebyshevU/Ultraspherical, because ClassicalOrthogonalPolynomials has noLegendre \ ChebyshevUconversion, and generalJacobi, becauseLegendre \ Jacobi(a,b)is the inverse of a banded product and its triangular structure isn't recognised.🤖 Generated with Claude Code