Skip to content

Commit d40aed8

Browse files
authored
size and \ for JacobiTransformPlan (#164)
* size and \ for JacobiTransformPlan * Update test_legendre.jl
1 parent bd5d352 commit d40aed8

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ClassicalOrthogonalPolynomials"
22
uuid = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd"
33
authors = ["Sheehan Olver <[email protected]>"]
4-
version = "0.12"
4+
version = "0.12.1"
55

66
[deps]
77
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"

src/classical/jacobi.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ struct JacobiTransformPlan{T, CHEB2JAC, DCT} <: Plan{T}
7575
end
7676

7777
JacobiTransformPlan(c2l, ct) = JacobiTransformPlan{promote_type(eltype(c2l),eltype(ct)),typeof(c2l),typeof(ct)}(c2l, ct)
78+
size(P::JacobiTransformPlan, k...) = size(P.chebtransform, k...)
7879

7980
*(P::JacobiTransformPlan, x::AbstractArray) = P.cheb2jac*(P.chebtransform*x)
81+
\(P::JacobiTransformPlan, x::AbstractArray) = P.chebtransform\(P.cheb2jac\x)
8082

8183

8284
include("legendre.jl")

test/test_legendre.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ import QuasiArrays: MulQuasiArray
5555

5656
X = randn(10, 11)
5757
F1 = plan_transform(P, X, 1)
58+
@test size(F1) == (10,11)
5859
p1 = plan_transform(P, X[:,1])
5960
@test F1*X hcat([p1 * X[:,j] for j = 1:size(X,2)]...)
6061
F2 = plan_transform(P, X, 2)
6162
p2 = plan_transform(P, X[1,:])
6263
@test F2*X vcat([(p2 * X[k,:])' for k = 1:size(X,1)]...)
6364
F = plan_transform(P, X)
6465
@test F*X F2*(F1*X)
66+
@test F\(F*X) X
6567
end
6668

6769
@testset "operators" begin

0 commit comments

Comments
 (0)