Skip to content

Commit 094e4b5

Browse files
Merge pull request #14 from JuliaGraphs/v0.6-dev
Release that supports Julia 0.6
2 parents ce5f15f + 7474d77 commit 094e4b5

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ os:
44
- linux
55
- osx
66
julia:
7-
- 0.5
7+
- 0.6
88
notifications:
99
email: false
1010
# uncomment the following lines to override the default test script
1111
script:
1212
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
13-
- julia -e 'Pkg.clone(pwd()); Pkg.build("NetworkLayout"); Pkg.clone("LightGraphs"); Pkg.test("NetworkLayout"; coverage=true)'
13+
- julia -e 'Pkg.clone(pwd()); Pkg.build("NetworkLayout"); Pkg.checkout("GeometryTypes"); Pkg.clone("LightGraphs"); Pkg.test("NetworkLayout"; coverage=true)'
1414
after_success:
1515
- julia -e 'cd(Pkg.dir("NetworkLayout")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())'

REQUIRE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
julia 0.5
1+
julia 0.6-
22
GeometryTypes
33
Compat 0.8.6
4-
FixedSizeArrays
4+
StaticArrays

appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
3+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
4+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
55
#- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
66
#- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
77

@@ -29,7 +29,7 @@ build_script:
2929
# Need to convert from shallow to complete for Pkg.clone to work
3030
- IF EXIST .git\shallow (git fetch --unshallow)
3131
- C:\projects\julia\bin\julia -e "versioninfo();
32-
Pkg.clone(pwd(), \"NetworkLayout\"); Pkg.build(\"NetworkLayout\")"
32+
Pkg.clone(pwd(), \"NetworkLayout\"); Pkg.build(\"NetworkLayout\"); Pkg.checkout(\"GeometryTypes\")"
3333

3434
test_script:
3535
- C:\projects\julia\bin\julia --check-bounds=yes -e "Pkg.test(\"NetworkLayout\")"

src/shell.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function layout!{M<:AbstractMatrix}(adj_matrix::M, nlist::Union{Void, Vector{Vec
2929
return Point{2,Float64}[Point(0.0,0.0)]
3030
end
3131
if nlist == nothing
32-
nlist = Array(Vector{Int}, 1)
32+
nlist = Array{Vector{Int}}(1)
3333
nlist[1] = collect(1:size(adj_matrix,1))
3434
end
3535
radius = 0.0

src/spectral.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function compute_laplacian{M<:AbstractMatrix}(adj_matrix::M, node_weights)
2727

2828
# scale the edge values by the product of node_weights, so that "heavier" nodes also form
2929
# stronger connections
30-
adj_matrix = adj_matrix .* sqrt(node_weights * node_weights')
30+
adj_matrix = adj_matrix .* sqrt.(node_weights * node_weights')
3131

3232
# D is a diagonal matrix with the degrees (total weights for that node) on the diagonal
3333
deg = vec(sum(adj_matrix,1)) - diag(adj_matrix)

src/stress.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ Reference:
5050
"""
5151
module Stress
5252

53-
using GeometryTypes, Compat, FixedSizeArrays
53+
using GeometryTypes, Compat, StaticArrays
5454
import Base: start, next, done, *
5555

56-
function (*){T<:LinAlg.BlasFloat,S<:FixedArray}(A::StridedMatrix{T}, x::StridedVector{S})
56+
function (*){T<:LinAlg.BlasFloat,S<:StaticArray}(A::StridedMatrix{T}, x::StridedVector{S})
5757
A_mul_B!(similar(x, S, size(A,1)), A, x)
5858
end
5959

60-
immutable Layout{M1<:AbstractMatrix, M2<:AbstractMatrix, VP<:AbstractVector,FT<:AbstractFloat}
60+
immutable Layout{M1<:AbstractMatrix, M2<:AbstractMatrix, VP<:AbstractVector, FT<:AbstractFloat}
6161
δ::M1
6262
weights::M2
6363
positions::VP
@@ -69,7 +69,7 @@ immutable Layout{M1<:AbstractMatrix, M2<:AbstractMatrix, VP<:AbstractVector,FT<:
6969
end
7070

7171

72-
function initialweights(D, T=eltype(D))
72+
function initialweights(D, T=Float64)::SparseMatrixCSC{T,Int64}
7373
map(D) do d
7474
x = T(d^(-2.0))
7575
isfinite(x) ? x : zero(T)
@@ -78,7 +78,7 @@ end
7878

7979
function Layout{N, T}(
8080
δ, PT::Type{Point{N, T}}=Point{2, Float64};
81-
startpositions=rand(PT, size(δ,1)), weights=initialweights(δ, T),
81+
startpositions=rand(PT, size(δ,1)), weights=initialweights(δ,T),
8282
iterations=400*size(δ,1)^2, abstols=(eps(T)),
8383
reltols=(eps(T)), abstolx=(eps(T))
8484
)

test/runtests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using GeometryTypes
1212

1313
function jagmesh()
1414
jagmesh_path = joinpath(dirname(@__FILE__), "jagmesh1.mtx")
15-
array = round(Int, open(readdlm, jagmesh_path))
15+
array = round.(Int, open(readdlm, jagmesh_path))
1616
row = array[:,1]
1717
col = array[:,2]
1818
entry = [(1:3600)...]
@@ -151,8 +151,8 @@ jagmesh_adj = jagmesh()
151151
for i in 1:size(a,1)
152152
p = Int32[]
153153
for e in collect(edges(g))
154-
if e[1] == i
155-
push!(p,e[2])
154+
if src(e) == i
155+
push!(p,dst(e))
156156
end
157157
end
158158
push!(n,p)

0 commit comments

Comments
 (0)