Skip to content

Commit

Permalink
Stieltjes points legendre (#15)
Browse files Browse the repository at this point in the history
* Update stieltjes.jl

* Update test_hilbert.jl
  • Loading branch information
dlfivefifty authored Jun 13, 2023
1 parent 1cb02f5 commit 253297c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stieltjes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ end
transpose(RecurrenceArray(z, (A,B,C), data))
end

@simplify function *(S::StieltjesPoints, P::Legendre)
S * Weighted(P)
end



##
# mapped
Expand Down
7 changes: 7 additions & 0 deletions test/test_hilbert.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ end
f = wT * (T \ exp.(x))
@test inv.(z .- x') * f [2.8826861116458593, 1.6307809018753612]
end

@testset "StieltjesPoints Legendre" begin
z = [2.,3.]
P = Legendre()
x = axes(P,1)
@test (inv.(z .- x') * P)[:,1:5] [(inv.(2 .- x')*P)[1:5]'; (inv.(3 .- x')*P)[1:5]']
end
end


Expand Down

0 comments on commit 253297c

Please sign in to comment.