Skip to content

Commit 877feee

Browse files
committed
remove method ambiguity
1 parent 3de1d0b commit 877feee

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

Project.toml

+9-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1414
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1515
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1616

17+
[compat]
18+
ArnoldiMethod = "0.0.4"
19+
ColorTypes = "0.9"
20+
Colors = "0.11"
21+
Compose = "0.7"
22+
LightGraphs = "1.1"
23+
VisualRegressionTests = ">= 0.2"
24+
julia = "1"
25+
1726
[extras]
1827
Cairo = "159f3aea-2a34-519c-b102-8c37f9878175"
1928
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
@@ -22,8 +31,3 @@ VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92"
2231

2332
[targets]
2433
test = ["Test", "Cairo", "ImageMagick", "VisualRegressionTests"]
25-
26-
[compat]
27-
"Compose" = ">= 0.7"
28-
"LightGraphs" = ">= 1.1"
29-
"VisualRegressionTests" = ">= 0.2"

src/layout.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ function spring_layout(g::AbstractGraph,
173173
end
174174

175175
using Random: MersenneTwister
176-
function spring_layout(g::AbstractGraph; seed::Integer=0, kws...)
176+
177+
function spring_layout(g::AbstractGraph, seed::Integer, kws...)
177178
rng = MersenneTwister(seed)
178179
spring_layout(g, 2 .* rand(rng, nv(g)) .- 1.0, 2 .* rand(rng,nv(g)) .- 1.0; kws...)
179180
end

test/runtests.jl

+1-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ karate_edges = Edge.([
4141
g = SimpleGraph(karate_edges)
4242
h = LightGraphs.WheelGraph(10)
4343

44-
45-
test_layout(g::AbstractGraph; kws...) = spring_layout(g; seed=2017, kws...)
44+
test_layout(g::AbstractGraph; kws...) = spring_layout(g, 2017, kws...)
4645

4746
# plot and save function for visual regression tests
4847
function plot_and_save(fname, g; gplot_kwargs...)

0 commit comments

Comments
 (0)