1
- using BlockArrays, FastTransforms, LazyArrays, LinearAlgebra, Test
1
+ using BlockArrays, BlockBandedMatrices, FastTransforms, LazyArrays, LinearAlgebra, Test
2
2
3
3
import FastTransforms: chebyshevmoments1, chebyshevabsmoments1, bivariatemoments
4
4
@@ -18,11 +18,6 @@ import FastTransforms: chebyshevmoments1, chebyshevabsmoments1, bivariatemoments
18
18
WC = BivariateChebyshevGramMatrix (μ)
19
19
@test W ≈ WC
20
20
21
- R = cholesky (W). U
22
- RC = cholesky (WC). U
23
-
24
- @test R ≈ RC
25
-
26
21
Gx = FastTransforms. compute_skew_generators (Val (1 ), W)
27
22
GxC = FastTransforms. compute_skew_generators (Val (1 ), WC)
28
23
@test Gx ≈ GxC
@@ -34,4 +29,20 @@ import FastTransforms: chebyshevmoments1, chebyshevabsmoments1, bivariatemoments
34
29
J = [zeros (n, n) Matrix {Float64} (I, n, n); Matrix {Float64} (- I, n, n) zeros (n, n)]
35
30
@test W. X' W- W* W. X ≈ Gx* J* Gx'
36
31
@test W. Y' W- W* W. Y ≈ Gy* J* Gy'
32
+
33
+ R = cholesky (W). U
34
+ RC = cholesky (WC). U
35
+
36
+ @test R ≈ RC
37
+
38
+ μ1 = PaddedVector (1 ./ [1 ,2 ,3 ], 2 n- 1 )
39
+ μ2 = PaddedVector (1 ./ [1 ,2 ,3 ,4 ,5 ,6 ], 2 n- 1 )
40
+ μ = bivariatemoments (μ1, μ2)
41
+ μ̂ = bivariatemoments (Vector (μ1), Vector (μ2))
42
+ @test μ ≈ μ̂
43
+
44
+ W = BivariateGramMatrix (μ, X, Y)
45
+ WC = BivariateChebyshevGramMatrix (μ)
46
+ @test blockbandwidths (W) == blockbandwidths (WC) == subblockbandwidths (W) == subblockbandwidths (WC) == (7 , 7 )
47
+ @test W ≈ WC
37
48
end
0 commit comments