Skip to content

Commit cd4fbe2

Browse files
committed
Merge branch 'master' of ssh://github.com/sbromberger/StaticGraphs.jl
2 parents 896c7d7 + 2dd285f commit cd4fbe2

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# StaticGraphs
22

3-
[![Build Status](https://travis-ci.org/sbromberger/StaticGraphs.jl.svg?branch=master)](https://travis-ci.org/sbromberger/StaticGraphs.jl)
3+
[![Build Status](https://travis-ci.org/JuliaGraphs/StaticGraphs.jl.svg?branch=master)](https://travis-ci.org/JuliaGraphs/StaticGraphs.jl)
44

5-
[![codecov.io](http://codecov.io/github/sbromberger/StaticGraphs.jl/coverage.svg?branch=master)](http://codecov.io/github/sbromberger/StaticGraphs.jl?branch=master)
5+
[![codecov.io](http://codecov.io/github/JuliaGraphs/StaticGraphs.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaGraphs/StaticGraphs.jl?branch=master)
66

77
Memory-efficient, performant graph structures optimized for large networks.
88
Uses [LightGraphs](https://github.com/JuliaGraphs/LightGraphs.jl).

src/StaticGraphs.jl

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,8 @@ indtype(g::AbstractStaticGraph{T, U}) where T where U = U
5757
eltype(x::AbstractStaticGraph) = vectype(x)
5858

5959
function show(io::IO, g::AbstractStaticGraph)
60-
if is_directed(g)
61-
dir = "directed"
62-
else
63-
dir = "undirected"
64-
end
65-
if nv(g) == 0
66-
print(io, "empty $dir simple static {$(vectype(g)), $(indtype(g))} graph")
67-
else
68-
print(io, "{$(nv(g)), $(ne(g))} $dir simple static {$(vectype(g)), $(indtype(g))} graph")
69-
end
60+
dir = is_directed(g)? "directed" : "undirected"
61+
print(io, "{$(nv(g)), $(ne(g))} $dir simple static {$(vectype(g)), $(indtype(g))} graph")
7062
end
7163

7264
@inline function _fvrange(g::AbstractStaticGraph, s::Integer)

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const testdir = dirname(@__FILE__)
1212
dhu = loadgraph(joinpath(testdir, "testdata", "pathdg-uint8.jsg"), SDGFormat())
1313

1414
@testset "staticgraph" begin
15-
@test sprint(show, StaticGraph(Graph())) == "empty undirected simple static {UInt8, UInt8} graph"
15+
@test sprint(show, StaticGraph(Graph())) == "{0, 0} undirected simple static {UInt8, UInt8} graph"
1616
g = smallgraph(:house)
1717
gu = squash(g)
1818
sg = StaticGraph(g)
@@ -52,7 +52,7 @@ const testdir = dirname(@__FILE__)
5252
end # staticgraph
5353

5454
@testset "staticdigraph" begin
55-
@test sprint(show, StaticDiGraph(DiGraph())) == "empty directed simple static {UInt8, UInt8} graph"
55+
@test sprint(show, StaticDiGraph(DiGraph())) == "{0, 0} directed simple static {UInt8, UInt8} graph"
5656
dg = PathDiGraph(5)
5757
dgu = squash(dg)
5858
dsg = StaticDiGraph(dg)

0 commit comments

Comments
 (0)