Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ClassicalOrthogonalPolynomials"
uuid = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd"
authors = ["Sheehan Olver <[email protected]>"]
version = "0.15.4"
version = "0.15.5"


[deps]
Expand Down Expand Up @@ -49,7 +49,7 @@ HypergeometricFunctions = "0.3.4"
InfiniteArrays = " 0.15"
InfiniteLinearAlgebra = "0.10.1"
IntervalSets = "0.7"
LazyArrays = "2.7"
LazyArrays = "2.8"
LazyBandedMatrices = "0.11"
MutableArithmetics = "1"
QuasiArrays = "0.12"
Expand Down
6 changes: 6 additions & 0 deletions src/normalized.jl
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,9 @@ diff_layout(::MappedOPLayouts, A, order::Int; dims...) = diff_layout(MappedBasis
diff_layout(::MappedOPLayouts, A, order...; dims...) = diff_layout(MappedBasisLayout(), A, order...; dims...)

diff_layout(::AbstractNormalizedOPLayout, A, order...; dims...) = diff_layout(ApplyLayout{typeof(*)}(), A, order...; dims...)

function qr(A::AbstractQuasiMatrix)
P = normalized(basis(A))
Q,R = qr(P \ A)
P * Q[:, axes(A,2)], R # TODO: ContinuumFactorization
end
9 changes: 8 additions & 1 deletion test/test_roots.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ClassicalOrthogonalPolynomials, Random, Test
using ClassicalOrthogonalPolynomials, QuasiArrays, Random, Test
using ClassicalOrthogonalPolynomials: sample

Random.seed!(5)
Expand All @@ -24,6 +24,13 @@ end
@test (Legendre() \ A)[1:5,1] ≈ [1; zeros(4)] # test transform bug
@test (P \ A)[1:5,1] ≈ [sqrt(2); zeros(4)]
Q,R = qr(P \ A)
@test (P * (Q*R))[0.1,:] ≈ A[0.1,:]
@test (A*inv(R))[0.1,:] ≈ QuasiArrays.ApplyQuasiArray(*, P, Q)[0.1,1:6]

Q,R = qr(A)
@test Q[0.1,:]'R ≈ A[0.1,:]'

# sum(expand(Q[:,k] .^2) for k=axes(Q,2))
end

@testset "minimum/maximum/extrema (#242)" begin
Expand Down
Loading