@@ -8,29 +8,29 @@ using StaticArrays
88
99using LinearAlgebra, SparseArrays
1010D= Diagonal ([1 ,2 ,3 ,4 ])
11- @test ArrayInterface . issparse (D)
11+ @test has_sparsestruct (D)
1212rowind,colind= findstructralnz (D)
1313@test [D[rowind[i],colind[i]] for i in 1 : 4 ]== [1 ,2 ,3 ,4 ]
1414
1515Bu = Bidiagonal ([1 ,2 ,3 ,4 ], [7 ,8 ,9 ], :U )
16- @test ArrayInterface . issparse (Bu)
16+ @test has_sparsestruct (Bu)
1717rowind,colind= findstructralnz (Bu)
1818@test [Bu[rowind[i],colind[i]] for i in 1 : 7 ]== [1 ,7 ,2 ,8 ,3 ,9 ,4 ]
1919Bl = Bidiagonal ([1 ,2 ,3 ,4 ], [7 ,8 ,9 ], :L )
20- @test ArrayInterface . issparse (Bl)
20+ @test has_sparsestruct (Bl)
2121rowind,colind= findstructralnz (Bl)
2222@test [Bl[rowind[i],colind[i]] for i in 1 : 7 ]== [1 ,7 ,2 ,8 ,3 ,9 ,4 ]
2323
2424Tri= Tridiagonal ([1 ,2 ,3 ],[1 ,2 ,3 ,4 ],[4 ,5 ,6 ])
25- @test ArrayInterface . issparse (Tri)
25+ @test has_sparsestruct (Tri)
2626rowind,colind= findstructralnz (Tri)
2727@test [Tri[rowind[i],colind[i]] for i in 1 : 10 ]== [1 ,2 ,3 ,4 ,4 ,5 ,6 ,1 ,2 ,3 ]
2828STri= SymTridiagonal ([1 ,2 ,3 ,4 ],[5 ,6 ,7 ])
29- @test ArrayInterface . issparse (STri)
29+ @test has_sparsestruct (STri)
3030rowind,colind= findstructralnz (STri)
3131@test [STri[rowind[i],colind[i]] for i in 1 : 10 ]== [1 ,2 ,3 ,4 ,5 ,6 ,7 ,5 ,6 ,7 ]
3232
3333Sp= sparse ([1 ,2 ,3 ],[1 ,2 ,3 ],[1 ,2 ,3 ])
34- @test ArrayInterface . issparse (Sp)
34+ @test has_sparsestruct (Sp)
3535rowind,colind= findstructralnz (Sp)
3636@test [Tri[rowind[i],colind[i]] for i in 1 : 3 ]== [1 ,2 ,3 ]
0 commit comments