Skip to content

Commit 65c3968

Browse files
make ChebyshevToLegendrePlan consistent
th_cheb2legplan now creates the ChebyshevToLegendrePlan.
1 parent cf090e3 commit 65c3968

File tree

2 files changed

+37
-42
lines changed

2 files changed

+37
-42
lines changed

docs/api/FastTransforms.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See also [`icjt`](#method__icjt.1) and [`jjt`](#method__jjt.1).
1313

1414

1515
*source:*
16-
[FastTransforms/src/cjt.jl:121](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/cjt.jl#L121)
16+
[FastTransforms/src/cjt.jl:121](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/cjt.jl#L121)
1717

1818
---
1919

@@ -23,7 +23,7 @@ Calculates the Gaunt coefficients in 64-bit floating-point arithmetic.
2323

2424

2525
*source:*
26-
[FastTransforms/src/gaunt.jl:24](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/gaunt.jl#L24)
26+
[FastTransforms/src/gaunt.jl:24](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/gaunt.jl#L24)
2727

2828
---
2929

@@ -43,7 +43,7 @@ This is a Julia implementation of the stable recurrence described in:
4343

4444

4545
*source:*
46-
[FastTransforms/src/gaunt.jl:14](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/gaunt.jl#L14)
46+
[FastTransforms/src/gaunt.jl:14](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/gaunt.jl#L14)
4747

4848
---
4949

@@ -56,7 +56,7 @@ See also [`cjt`](#method__cjt.1) and [`jjt`](#method__jjt.1).
5656

5757

5858
*source:*
59-
[FastTransforms/src/cjt.jl:129](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/cjt.jl#L129)
59+
[FastTransforms/src/cjt.jl:129](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/cjt.jl#L129)
6060

6161
---
6262

@@ -69,7 +69,7 @@ See also [`cjt`](#method__cjt.1) and [`icjt`](#method__icjt.1).
6969

7070

7171
*source:*
72-
[FastTransforms/src/cjt.jl:137](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/cjt.jl#L137)
72+
[FastTransforms/src/cjt.jl:137](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/cjt.jl#L137)
7373

7474
---
7575

@@ -88,7 +88,7 @@ Optionally:
8888

8989

9090
*source:*
91-
[FastTransforms/src/cjt.jl:158](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/cjt.jl#L158)
91+
[FastTransforms/src/cjt.jl:158](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/cjt.jl#L158)
9292

9393
---
9494

@@ -107,7 +107,7 @@ Optionally:
107107

108108

109109
*source:*
110-
[FastTransforms/src/cjt.jl:172](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/cjt.jl#L172)
110+
[FastTransforms/src/cjt.jl:172](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/cjt.jl#L172)
111111

112112
## Internal
113113

@@ -122,7 +122,7 @@ Modified Chebyshev moments of the first kind with respect to the Jacobi weight:
122122

123123

124124
*source:*
125-
[FastTransforms/src/specialfunctions.jl:399](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L399)
125+
[FastTransforms/src/specialfunctions.jl:399](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L399)
126126

127127
---
128128

@@ -135,7 +135,7 @@ Modified Chebyshev moments of the second kind with respect to the Jacobi weight:
135135

136136

137137
*source:*
138-
[FastTransforms/src/specialfunctions.jl:417](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L417)
138+
[FastTransforms/src/specialfunctions.jl:417](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L417)
139139

140140
---
141141

@@ -145,7 +145,7 @@ Compute weights of the Clenshaw—Curtis quadrature rule with a Jacobi weight.
145145

146146

147147
*source:*
148-
[FastTransforms/src/clenshawcurtis.jl:12](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/clenshawcurtis.jl#L12)
148+
[FastTransforms/src/clenshawcurtis.jl:12](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/clenshawcurtis.jl#L12)
149149

150150
---
151151

@@ -155,7 +155,7 @@ Compute nodes and weights of the Clenshaw—Curtis quadrature rule with a Jacobi
155155

156156

157157
*source:*
158-
[FastTransforms/src/clenshawcurtis.jl:6](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/clenshawcurtis.jl#L6)
158+
[FastTransforms/src/clenshawcurtis.jl:6](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/clenshawcurtis.jl#L6)
159159

160160
---
161161

@@ -165,7 +165,7 @@ Compute Jacobi expansion coefficients in Pₙ^(α-1,β) given Jacobi expansion c
165165

166166

167167
*source:*
168-
[FastTransforms/src/specialfunctions.jl:467](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L467)
168+
[FastTransforms/src/specialfunctions.jl:467](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L467)
169169

170170
---
171171

@@ -175,7 +175,7 @@ Compute Jacobi expansion coefficients in Pₙ^(α-1,α-1) given Jacobi expansion
175175

176176

177177
*source:*
178-
[FastTransforms/src/specialfunctions.jl:489](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L489)
178+
[FastTransforms/src/specialfunctions.jl:489](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L489)
179179

180180
---
181181

@@ -185,7 +185,7 @@ Compute Jacobi expansion coefficients in Pₙ^(α,β-1) given Jacobi expansion c
185185

186186

187187
*source:*
188-
[FastTransforms/src/specialfunctions.jl:478](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L478)
188+
[FastTransforms/src/specialfunctions.jl:478](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L478)
189189

190190
---
191191

@@ -195,7 +195,7 @@ Compute nodes and weights of Fejer's first quadrature rule with a Jacobi weight.
195195

196196

197197
*source:*
198-
[FastTransforms/src/fejer.jl:7](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/fejer.jl#L7)
198+
[FastTransforms/src/fejer.jl:7](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/fejer.jl#L7)
199199

200200
---
201201

@@ -205,7 +205,7 @@ Compute nodes and weights of Fejer's second quadrature rule with a Jacobi weight
205205

206206

207207
*source:*
208-
[FastTransforms/src/fejer.jl:12](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/fejer.jl#L12)
208+
[FastTransforms/src/fejer.jl:12](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/fejer.jl#L12)
209209

210210
---
211211

@@ -215,7 +215,7 @@ Compute weights of Fejer's first quadrature rule with a Jacobi weight.
215215

216216

217217
*source:*
218-
[FastTransforms/src/fejer.jl:21](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/fejer.jl#L21)
218+
[FastTransforms/src/fejer.jl:21](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/fejer.jl#L21)
219219

220220
---
221221

@@ -225,7 +225,7 @@ Compute weights of Fejer's second quadrature rule with a Jacobi weight.
225225

226226

227227
*source:*
228-
[FastTransforms/src/fejer.jl:26](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/fejer.jl#L26)
228+
[FastTransforms/src/fejer.jl:26](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/fejer.jl#L26)
229229

230230
---
231231

@@ -235,7 +235,7 @@ Compute a typed 0.5.
235235

236236

237237
*source:*
238-
[FastTransforms/src/specialfunctions.jl:12](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L12)
238+
[FastTransforms/src/specialfunctions.jl:12](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L12)
239239

240240
---
241241

@@ -245,7 +245,7 @@ Compute Jacobi expansion coefficients in Pₙ^(α+1,β) given Jacobi expansion c
245245

246246

247247
*source:*
248-
[FastTransforms/src/specialfunctions.jl:432](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L432)
248+
[FastTransforms/src/specialfunctions.jl:432](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L432)
249249

250250
---
251251

@@ -255,7 +255,7 @@ Compute Jacobi expansion coefficients in Pₙ^(α+1,α+1) given Jacobi expansion
255255

256256

257257
*source:*
258-
[FastTransforms/src/specialfunctions.jl:454](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L454)
258+
[FastTransforms/src/specialfunctions.jl:454](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L454)
259259

260260
---
261261

@@ -265,7 +265,7 @@ Compute Jacobi expansion coefficients in Pₙ^(α,β+1) given Jacobi expansion c
265265

266266

267267
*source:*
268-
[FastTransforms/src/specialfunctions.jl:443](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L443)
268+
[FastTransforms/src/specialfunctions.jl:443](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L443)
269269

270270
---
271271

@@ -275,7 +275,7 @@ Pochhammer symbol (x)_n = Γ(x+n)/Γ(x) for the rising factorial.
275275

276276

277277
*source:*
278-
[FastTransforms/src/specialfunctions.jl:32](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L32)
278+
[FastTransforms/src/specialfunctions.jl:32](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L32)
279279

280280
---
281281

@@ -285,7 +285,7 @@ Stirling series for Γ(z).
285285

286286

287287
*source:*
288-
[FastTransforms/src/specialfunctions.jl:63](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L63)
288+
[FastTransforms/src/specialfunctions.jl:63](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L63)
289289

290290
---
291291

@@ -295,7 +295,7 @@ Compute a typed 2.
295295

296296

297297
*source:*
298-
[FastTransforms/src/specialfunctions.jl:20](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L20)
298+
[FastTransforms/src/specialfunctions.jl:20](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L20)
299299

300300
---
301301

@@ -307,7 +307,7 @@ For 64-bit floating-point arithmetic, the Lambda function uses the asymptotic se
307307

308308

309309
*source:*
310-
[FastTransforms/src/specialfunctions.jl:147](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L147)
310+
[FastTransforms/src/specialfunctions.jl:147](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L147)
311311

312312
---
313313

@@ -317,7 +317,7 @@ The Lambda function Λ(z) = Γ(z+½)/Γ(z+1) for the ratio of gamma functions.
317317

318318

319319
*source:*
320-
[FastTransforms/src/specialfunctions.jl:141](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L141)
320+
[FastTransforms/src/specialfunctions.jl:141](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L141)
321321

322322
---
323323

@@ -327,7 +327,7 @@ The Lambda function Λ(z,λ₁,λ₂) = Γ(z+λ₁)/Γ(z+λ₂) for the ratio of
327327

328328

329329
*source:*
330-
[FastTransforms/src/specialfunctions.jl:160](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L160)
330+
[FastTransforms/src/specialfunctions.jl:160](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L160)
331331

332332
---
333333

@@ -337,7 +337,7 @@ The Kronecker δ function.
337337

338338

339339
*source:*
340-
[FastTransforms/src/specialfunctions.jl:26](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/specialfunctions.jl#L26)
340+
[FastTransforms/src/specialfunctions.jl:26](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/specialfunctions.jl#L26)
341341

342342
---
343343

@@ -351,5 +351,5 @@ where the Hankel matrix `H` is non-negative definite. This allows a Cholesky dec
351351

352352

353353
*source:*
354-
[FastTransforms/src/toeplitzhankel.jl:8](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/b6e4fdf35a2160f0d9948e6565fd69c2177f4d82/src/toeplitzhankel.jl#L8)
354+
[FastTransforms/src/toeplitzhankel.jl:8](https://github.com/MikaelSlevinsky/FastTransforms.jl/tree/cf090e3655e959c23556d1af681c3378ab9c3081/src/toeplitzhankel.jl#L8)
355355

src/toeplitzhankel.jl

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,31 +156,26 @@ function jac2jacTH{S}(::Type{S},n,α,β,γ,δ)
156156
T,H,DL,DR
157157
end
158158

159-
th_leg2chebplan{S}(::Type{S},n)=ToeplitzHankelPlan(leg2chebTH(S,n)...,ones(S,n))
160-
th_cheb2legplan{S}(::Type{S},n)=ToeplitzHankelPlan(cheb2legTH(S,n)...)
161-
th_leg2chebuplan{S}(::Type{S},n)=ToeplitzHankelPlan(leg2chebuTH(S,n)...,1:n,ones(S,n))
162-
th_ultra2ultraplan{S}(::Type{S},n,λ₁,λ₂)=ToeplitzHankelPlan(ultra2ultraTH(S,n,λ₁,λ₂)...)
163-
th_jac2jacplan{S}(::Type{S},n,α,β,γ,δ)=ToeplitzHankelPlan(jac2jacTH(S,n,α,β,γ,δ)...)
164-
165-
166159
immutable ChebyshevToLegendrePlan{TH}
167160
toeplitzhankel::TH
168161
end
169162

170-
ChebyshevToLegendrePlan{S}(::Type{S},n) = ChebyshevToLegendrePlan(th_cheb2legplan(S,n))
171-
172-
173163
function *(P::ChebyshevToLegendrePlan,v::AbstractVector)
174164
w = zero(v)
175165
S,n = eltype(v),length(v)
176166
w[1:2:end] = -one(S)./(one(S):two(S):n)./(-one(S):two(S):n-two(S))
177167
[dot(w,v);P.toeplitzhankel*view(v,2:n)]
178168
end
179169

170+
th_leg2chebplan{S}(::Type{S},n)=ToeplitzHankelPlan(leg2chebTH(S,n)...,ones(S,n))
171+
th_cheb2legplan{S}(::Type{S},n)=ChebyshevToLegendrePlan(ToeplitzHankelPlan(cheb2legTH(S,n)...))
172+
th_leg2chebuplan{S}(::Type{S},n)=ToeplitzHankelPlan(leg2chebuTH(S,n)...,1:n,ones(S,n))
173+
th_ultra2ultraplan{S}(::Type{S},n,λ₁,λ₂)=ToeplitzHankelPlan(ultra2ultraTH(S,n,λ₁,λ₂)...)
174+
th_jac2jacplan{S}(::Type{S},n,α,β,γ,δ)=ToeplitzHankelPlan(jac2jacTH(S,n,α,β,γ,δ)...)
180175

181-
th_leg2cheb(v)=th_leg2chebplan(eltype(v),length(v))*v
182-
th_cheb2leg(v) = ChebyshevToLegendrePlan(eltype(v),length(v))*v
183176

177+
th_leg2cheb(v)=th_leg2chebplan(eltype(v),length(v))*v
178+
th_cheb2leg(v) = th_cheb2legplan(eltype(v),length(v))*v
184179
th_leg2chebu(v)=th_leg2chebuplan(eltype(v),length(v))*v
185180
th_ultra2ultra(v,λ₁,λ₂)=th_ultra2ultraplan(eltype(v),length(v),λ₁,λ₂)*v
186181
th_jac2jac(v,α,β,γ,δ)=th_jac2jacplan(eltype(v),length(v),α,β,γ,δ)*v

0 commit comments

Comments
 (0)