Skip to content

Commit 1e6fc10

Browse files
authored
Fix ExpWeight constructor (#92)
1 parent 252dbcd commit 1e6fc10

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunSingularities"
22
uuid = "f8fcb915-6b99-5be2-b79a-d6dbef8e6e7e"
3-
version = "0.3.17"
3+
version = "0.3.18"
44

55
[deps]
66
ApproxFunBase = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"

src/ExpWeight.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ end
77

88
function ExpWeight(q,sp)
99
@assert domain(q) == domain(sp)
10-
ExpWeight{typeof(sp),typeof(q),domaintype(q),rangetype(q)}(q,sp)
10+
ExpWeight{typeof(sp),typeof(q),domaintype(space(q)),rangetype(space(q))}(q,sp)
1111
end
1212

1313
weight(sp::ExpWeight,x) = exp(sp.exponent(x))

test/runtests.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,14 @@ end
359359
end
360360
end
361361

362+
@testset "ExpWeight" begin
363+
S = ExpWeight(-Fun()^2, Chebyshev())
364+
x = 0.5
365+
n = 2
366+
@test S(n, x) exp(-x^2) * Chebyshev()(n, x)
367+
@test S(n)'(x) exp(-x^2) * Chebyshev()(n)'(x) - 2x * exp(-x^2) * Chebyshev()(n, x)
368+
end
369+
362370
@testset "DiracDelta and PointSpace" begin
363371
a,b=DiracDelta(0.),DiracDelta(1.)
364372
f=Fun(exp)

0 commit comments

Comments
 (0)