Skip to content

Commit 81ec4e2

Browse files
authored
import MersenneTwister
1 parent 300ab74 commit 81ec4e2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/layout.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ function spring_layout(g::AbstractGraph{T}, locs_x, locs_y; C=2.0, MAXITER=100,
168168
return locs_x,locs_y
169169
end
170170

171+
using Random: MersenneTwister
171172
function spring_layout(g::AbstractGraph; seed::Integer=0, kws...)
172173
rng = MersenneTwister(seed)
173174
spring_layout(g, 2 .* rand(rng, nv(g)) .- 1.0, 2 .* rand(rng,nv(g)) .- 1.0; kws...)

0 commit comments

Comments
 (0)