Skip to content

Commit

Permalink
restore tests?
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelSlevinsky committed Jan 28, 2025
1 parent cd46f52 commit 526155c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/grammatrixtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ using FastTransforms, BandedMatrices, LazyArrays, LinearAlgebra, Test
b = 4
X = BandedMatrix(SymTridiagonal(zeros(T, n+b), [sqrt(T(n)^2/(4*n^2-1)) for n in 1:n+b-1])) # normalized Legendre X
M = Symmetric((I+X^2+X^4)[1:n, 1:n])
W = GramMatrix(M, X[1:n, 1:n])
X = BandedMatrix(SymTridiagonal(zeros(T, n), [sqrt(T(n)^2/(4*n^2-1)) for n in 1:n-1])) # normalized Legendre X
W = GramMatrix(M, X)
@test bandwidths(W) == (b, b)
F = cholesky(W)
@test F.L*F.L' M

X = BandedMatrix(SymTridiagonal(T[2n-1 for n in 1:n+b], T[-n for n in 1:n+b-1])) # Laguerre X, tests nonzero diagonal
M = Symmetric((I+X^2+X^4)[1:n, 1:n])
W = GramMatrix(M, X[1:n, 1:n])
X = BandedMatrix(SymTridiagonal(T[2n-1 for n in 1:n], T[-n for n in 1:n-1])) # Laguerre X, tests nonzero diagonal
W = GramMatrix(M, X)
@test bandwidths(W) == (b, b)
F = cholesky(W)
@test F.L*F.L' M
Expand Down

0 comments on commit 526155c

Please sign in to comment.