Skip to content

Commit 44cb3d6

Browse files
new example on subspace angles of Laguerre polynomials with a perturbed measure
1 parent acfefb6 commit 44cb3d6

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

docs/make.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ examples = [
1212
"padua.jl",
1313
"sphere.jl",
1414
"spinweighted.jl",
15+
"subspaceangles.jl",
1516
"triangle.jl",
1617
]
1718

@@ -41,6 +42,7 @@ makedocs(
4142
"generated/padua.md",
4243
"generated/sphere.md",
4344
"generated/spinweighted.md",
45+
"generated/subspaceangles.md",
4446
"generated/triangle.md",
4547
],
4648
]

examples/spinweighted.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ k = [2/7, 3/7, 6/7]
2727
r = (θ,φ) -> [sinpi(θ)*cospi(φ), sinpi(θ)*sinpi(φ), cospi(θ)]
2828

2929
# On the tensor product grid, our function samples are:
30-
3130
F = [exp(im*(kr(θ,φ))) for θ in θ, φ in φ]
3231

3332
# We precompute a spin-$0$ spherical harmonic--Fourier plan:

examples/subspaceangles.jl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# # Subspace angles
2+
# This example considers the angles between neighbouring Laguerre polynomials with a perturbed measure:
3+
# ```math
4+
# \cos\theta_n = \dfrac{\langle L_n, L_{n+k}\rangle}{\|L_n|_2 \|L_{n+k}\|_2},\quad{\rm for}\quad 0\le n < N-k,
5+
# ```
6+
# where the inner product is defined by $\langle f, g\rangle = \int_0^\infty f(x) g(x) x^\beta e^{-x}{\rm\,d}x$.
7+
#
8+
# We do so by connecting Laguerre polynomials to the normalized generalized Laguerre polynomials associated with the perturbed measure. It follows by the inner product of the connection coefficients that:
9+
# ```math
10+
# \cos\theta_n = \dfrac{(V^\top V)_{n, n+k}}{\sqrt{(V^\top V)_{n, n}(V^\top V)_{n+k, n+k}}}.
11+
# ```
12+
#
13+
using FastTransforms, LinearAlgebra
14+
15+
# The neighbouring index `k` and the maximum degree `N-1`:
16+
k, N = 1, 11
17+
18+
# The Laguerre connection parameters:
19+
α, β = 0.0, 0.5
20+
21+
# We precompute a Laguerre--Laguerre plan:
22+
P = plan_lag2lag(Float64, N, α, β; norm2=true)
23+
24+
# We apply the plan to the identity, followed by the adjoint plan:
25+
VtV = P*I
26+
lmul!(P', VtV)
27+
28+
# From this matrix, the angles are recovered from:
29+
θ = [acos(VtV[n, n+k]/sqrt(VtV[n, n]*VtV[n+k, n+k])) for n in 1:N-k]

0 commit comments

Comments
 (0)