Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
fixes #686 by streamlining bc read (#688)
Browse files Browse the repository at this point in the history
Thanks, @jpfairbanks !
  • Loading branch information
sbromberger authored Jul 15, 2017
1 parent 6642481 commit 821563c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions test/centrality/betweenness.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,9 @@
s1 = Graph(s2)
g3 = PathGraph(5)

function readcentrality(f::AbstractString)
f = open(f, "r")
c = Vector{Float64}()
while !eof(f)
line = chomp(readline(f))
push!(c, float(line))
end
return c
end


gint = loadgraph(joinpath(testdir, "testdata", "graph-50-500.jgz"), "graph-50-500")

c = readcentrality(joinpath(testdir, "testdata", "graph-50-500-bc.txt"))
c = vec(readcsv(joinpath(testdir, "testdata", "graph-50-500-bc.txt")))
for g in testdigraphs(gint)
z = @inferred(betweenness_centrality(g))
zp = @inferred(parallel_betweenness_centrality(g))
Expand Down

0 comments on commit 821563c

Please sign in to comment.