Skip to content

Commit 6e190be

Browse files
committed
export layouts
1 parent 0a9268f commit 6e190be

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

docs/src/index.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ SFDP
3535
```
3636
### Example
3737
```@example layouts
38-
using NetworkLayout: SFDP
3938
g = wheel_graph(10)
4039
layout = SFDP(tol=0.01, C=0.2, K=1)
4140
f, ax, p = graphplot(g, layout=layout)
@@ -59,8 +58,6 @@ Buchheim
5958
```
6059
### Example
6160
```@example layouts
62-
using NetworkLayout: Buchheim
63-
6461
adj_matrix = [0 1 1 0 0 0 0 0 0 0;
6562
0 0 0 0 1 1 0 0 0 0;
6663
0 0 0 1 0 0 1 0 1 0;
@@ -83,7 +80,6 @@ Spring
8380
```
8481
### Example
8582
```@example layouts
86-
using NetworkLayout: Spring
8783
g = smallgraph(:cubical)
8884
layout = Spring()
8985
f, ax, p = graphplot(g, layout=layout)
@@ -106,7 +102,6 @@ Stress
106102
```
107103
### Example
108104
```@example layouts
109-
using NetworkLayout: Stress
110105
g = complete_graph(10)
111106
layout = Stress()
112107
Random.seed!(1)
@@ -130,7 +125,6 @@ nothing #hide
130125
Circular
131126
```
132127
```@example layouts
133-
using NetworkLayout: Circular
134128
g = smallgraph(:karate)
135129
layout = Circular()
136130
f, ax, p = graphplot(g, layout=layout)
@@ -142,7 +136,6 @@ hidedecorations!(ax); hidespines!(ax); ax.aspect = DataAspect(); f #hide
142136
Shell
143137
```
144138
```@example layouts
145-
using NetworkLayout: Shell
146139
g = smallgraph(:petersen)
147140
layout = Shell(nlist=[6:10,])
148141
f, ax, p = graphplot(g, layout=layout)

src/buchheim.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export Buchheim
2+
13
"""
24
Buchheim(; kwargs...)(adj_matrix)
35
Buchheim(; kwargs...)(adj_list)

src/circular.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export Circular
2+
13
"""
24
Circular(; kwargs...)(adj_matrix)
35
layout(algo::Circular, adj_matrix)

src/sfdp.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export SFDP
2+
13
"""
24
SFDP(; kwargs...)(adj_matrix)
35
layout(algo::SFDP, adj_matrix)

src/shell.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export Shell
2+
13
"""
24
Shell(; kwargs...)(adj_matrix)
35
layout(algo::Shell, adj_matrix)

src/spectral.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using LinearAlgebra: diag, eigen, Diagonal
22

3+
export Spectral
4+
35
"""
46
Spectral(; kwargs...)(adj_matrix)
57
layout(algo::Spectral, adj_matrix)

src/spring.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export Spring
2+
13
"""
24
Spring(; kwargs...)(adj_matrix)
35
layout(algo::Spring, adj_matrix)

src/stress.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using LinearAlgebra: checksquare, norm, pinv, mul!
22
using SparseArrays: SparseMatrixCSC
33

4+
export Stress
5+
46
"""
57
Stress(; kwargs...)(adj_matrix)
68
layout(algo::Stress, adj_matrix)

test/runtests.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jagmesh_adj = jagmesh()
1717

1818
@testset "Testing NetworkLayout" begin
1919
@testset "Testing SFDP" begin
20-
using NetworkLayout: SFDP
2120
println("SFDP")
2221
@testset "SFDP construction" begin
2322
algo = SFDP()
@@ -65,7 +64,6 @@ jagmesh_adj = jagmesh()
6564
end
6665

6766
@testset "Testing Stress Majorization Algorithm" begin
68-
using NetworkLayout: Stress
6967
println("Stress")
7068
@testset "Stress construction" begin
7169
algo = Stress()
@@ -113,7 +111,6 @@ jagmesh_adj = jagmesh()
113111
end
114112

115113
@testset "Testing Spring Algorithm" begin
116-
using NetworkLayout: Spring
117114
println("Spring wheel_graph")
118115
@testset "Spring construction" begin
119116
algo = Spring()
@@ -152,7 +149,6 @@ jagmesh_adj = jagmesh()
152149
end
153150

154151
@testset "Testing Spectral Algorithm" begin
155-
using NetworkLayout: Spectral
156152
println("Spectral wheel_graph")
157153
@testset "Testing wheel_graph" begin
158154
g = wheel_graph(10)
@@ -165,7 +161,6 @@ jagmesh_adj = jagmesh()
165161
end
166162

167163
@testset "Testing Circular Layout Algorithm" begin
168-
using NetworkLayout: Circular
169164
println("Circular wheel_graph")
170165
@testset "Testing wheel_graph" begin
171166
g = wheel_graph(10)
@@ -184,7 +179,6 @@ jagmesh_adj = jagmesh()
184179
end
185180

186181
@testset "Testing Shell Layout Algorithm" begin
187-
using NetworkLayout: Shell
188182
println("Shell wheel_graph")
189183

190184
@testset "Testing wheel_graph" begin
@@ -203,7 +197,6 @@ jagmesh_adj = jagmesh()
203197

204198
@testset "Testing Buchheim Tree Drawing" begin
205199
println("Buchheim")
206-
using NetworkLayout: Buchheim
207200
using NetworkLayout: adj_mat_to_list
208201

209202
@testset "matrix -> list conversion" begin

0 commit comments

Comments
 (0)