@@ -8,29 +8,29 @@ using StaticArrays
8
8
9
9
using LinearAlgebra, SparseArrays
10
10
D= Diagonal ([1 ,2 ,3 ,4 ])
11
- @test ArrayInterface . issparse (D)
11
+ @test has_sparsestruct (D)
12
12
rowind,colind= findstructralnz (D)
13
13
@test [D[rowind[i],colind[i]] for i in 1 : 4 ]== [1 ,2 ,3 ,4 ]
14
14
15
15
Bu = Bidiagonal ([1 ,2 ,3 ,4 ], [7 ,8 ,9 ], :U )
16
- @test ArrayInterface . issparse (Bu)
16
+ @test has_sparsestruct (Bu)
17
17
rowind,colind= findstructralnz (Bu)
18
18
@test [Bu[rowind[i],colind[i]] for i in 1 : 7 ]== [1 ,7 ,2 ,8 ,3 ,9 ,4 ]
19
19
Bl = Bidiagonal ([1 ,2 ,3 ,4 ], [7 ,8 ,9 ], :L )
20
- @test ArrayInterface . issparse (Bl)
20
+ @test has_sparsestruct (Bl)
21
21
rowind,colind= findstructralnz (Bl)
22
22
@test [Bl[rowind[i],colind[i]] for i in 1 : 7 ]== [1 ,7 ,2 ,8 ,3 ,9 ,4 ]
23
23
24
24
Tri= Tridiagonal ([1 ,2 ,3 ],[1 ,2 ,3 ,4 ],[4 ,5 ,6 ])
25
- @test ArrayInterface . issparse (Tri)
25
+ @test has_sparsestruct (Tri)
26
26
rowind,colind= findstructralnz (Tri)
27
27
@test [Tri[rowind[i],colind[i]] for i in 1 : 10 ]== [1 ,2 ,3 ,4 ,4 ,5 ,6 ,1 ,2 ,3 ]
28
28
STri= SymTridiagonal ([1 ,2 ,3 ,4 ],[5 ,6 ,7 ])
29
- @test ArrayInterface . issparse (STri)
29
+ @test has_sparsestruct (STri)
30
30
rowind,colind= findstructralnz (STri)
31
31
@test [STri[rowind[i],colind[i]] for i in 1 : 10 ]== [1 ,2 ,3 ,4 ,5 ,6 ,7 ,5 ,6 ,7 ]
32
32
33
33
Sp= sparse ([1 ,2 ,3 ],[1 ,2 ,3 ],[1 ,2 ,3 ])
34
- @test ArrayInterface . issparse (Sp)
34
+ @test has_sparsestruct (Sp)
35
35
rowind,colind= findstructralnz (Sp)
36
36
@test [Tri[rowind[i],colind[i]] for i in 1 : 3 ]== [1 ,2 ,3 ]
0 commit comments