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

Commit

Permalink
Merge pull request #122 from Keno/pull-request/471932cd
Browse files Browse the repository at this point in the history
Fix call to and missing requirement declaration on vertex_index
  • Loading branch information
pozorvlak committed Sep 15, 2014
2 parents 145f007 + 471932c commit 4de1cbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function to_dot{G<:AbstractGraph}(graph::G, stream::IO)
has_edge_attrs = method_exists(attributes, (edge_type(graph), G))

write(stream, "$(graph_type_string(graph)) graphname {\n")
if implements_edge_list(graph)
if implements_edge_list(graph) && implements_vertex_map(graph)
for edge in edges(graph)
write(stream,"$(vertex_index(source(edge), graph)) $(edge_op(graph)) $(vertex_index(target(edge), graph))\n")
end
Expand All @@ -42,7 +42,7 @@ function to_dot{G<:AbstractGraph}(graph::G, stream::IO)
else # implements_adjacency_list
for n in out_neighbors(vertex, graph)
if is_directed(graph) || vertex_index(n, graph) > vertex_index(vertex, graph)
write(stream,"$(vertex_index(vertex, graph)) $(edge_op(graph)) $(vertex_index(n))\n")
write(stream,"$(vertex_index(vertex, graph)) $(edge_op(graph)) $(vertex_index(n,graph))\n")
end
end
end
Expand Down

0 comments on commit 4de1cbc

Please sign in to comment.