Skip to content

Commit 00424ff

Browse files
authored
Reduce cost of weighted lowering (#87)
* more direct constant computation * Update Project.toml
1 parent 60fe828 commit 00424ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SemiclassicalOrthogonalPolynomials"
22
uuid = "291c01f3-23f6-4eb6-aeb0-063a639b53f2"
33
authors = ["Sheehan Olver <[email protected]>"]
4-
version = "0.5"
4+
version = "0.5.1"
55

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

src/SemiclassicalOrthogonalPolynomials.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ function \(w_A::WeightedSemiclassicalJacobi, w_B::WeightedSemiclassicalJacobi)
349349
Δc = B.c-A.c
350350

351351
if (wA.a == A.a) && (wA.b == A.b) && (wA.c == A.c) && (wB.a == B.a) && (wB.b == B.b) && (wB.c == B.c) && isinteger(A.a) && isinteger(A.b) && isinteger(A.c) && isinteger(B.a) && isinteger(B.b) && isinteger(B.c)
352-
k = (A \ SemiclassicalJacobiWeight(A.t,Δa,Δb,Δc))[1]
352+
k = sum(SemiclassicalJacobiWeight(B.t,B.a,B.b,B.c))/sum(SemiclassicalJacobiWeight(A.t,A.a,A.b,A.c)) # = (A \ SemiclassicalJacobiWeight(A.t,Δa,Δb,Δc))[1]
353353
return (ApplyArray(*,Diagonal(Fill(k,∞)),(B \ A)))'
354354
elseif wA.a == wB.a && wA.b == wB.b && wA.c == wB.c # fallback to Christoffel–Darboux
355355
A \ B
@@ -508,4 +508,4 @@ end
508508

509509
include("neg1c.jl")
510510

511-
end
511+
end

0 commit comments

Comments
 (0)