Skip to content

Commit 251c612

Browse files
committed
Update normalized.jl
1 parent 070f0a7 commit 251c612

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/normalized.jl

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,8 @@ copy(Q::OrthonormalWeighted) = Q
183183

184184
==(A::OrthonormalWeighted, B::OrthonormalWeighted) = A.P == B.P
185185

186-
function getindex(Q::OrthonormalWeighted, x::Number, jr::OneTo)
186+
function getindex(Q::OrthonormalWeighted, x::Union{Number,AbstractVector}, jr::Union{Number,AbstractVector})
187187
w = orthogonalityweight(Q.P)
188-
sqrt(w[x]/sum(w)) * Q.P[x,jr]
188+
sqrt.(w[x]) .* Q.P[x,jr]
189189
end
190-
191-
function getindex(Q::OrthonormalWeighted, x::Number, j::Number)
192-
w = orthogonalityweight(Q.P)
193-
sqrt(w[x]) * Q.P[x,j]
194-
end
195-
196-
getindex(Q::OrthonormalWeighted, x::Number, n::AbstractVector) = Q[x, Base.OneTo(maximum(n))][n]
197-
198190
broadcasted(::LazyQuasiArrayStyle{2}, ::typeof(*), x::Inclusion, Q::OrthonormalWeighted) = Q * (Q.P \ (x .* Q.P))

0 commit comments

Comments
 (0)