File tree Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -35,19 +35,20 @@ julia> using LightGraphs
35
35
julia> test_graph = meta_graph(DiGraph(),
36
36
AtVertex = Dict{Symbol, String},
37
37
AtEdge = Dict{Symbol, String},
38
- graph_meta = (tagged = true,)
38
+ graph_meta = (tag_1 = true, tag_2 = true )
39
39
);
40
40
41
- julia> a = push!(test_graph, Dict(:name => "a")); b = push!(test_graph, Dict(:name => "b"));
41
+ julia> push!(test_graph, Dict(:name => "a")); push!(test_graph, Dict(:name => "b"));
42
42
43
- julia> test_graph[Edge(a, b )] = Dict(:name => "ab");
43
+ julia> test_graph[Edge(1, 2 )] = Dict(:name => "ab");
44
44
45
45
julia> mktemp() do file, io
46
46
savegraph(file, test_graph, DOTFormat())
47
47
print(read(file, String))
48
48
end
49
49
digraph {
50
- tagged = true
50
+ tag_1 = true
51
+ tag_2 = true
51
52
1 [name = "a"]
52
53
2 [name = "b"]
53
54
1 -> 2 [name = "ab"]
Original file line number Diff line number Diff line change @@ -69,3 +69,23 @@ graph_weights = weights(weighted_graph)
69
69
@test graph_weights[rock, paper] == 1.0
70
70
@test size (graph_weights) == (3 , 3 )
71
71
end
72
+
73
+ undirected = meta_graph (Graph (),
74
+ AtVertex = Nothing,
75
+ AtEdge = Nothing
76
+ )
77
+ push! (undirected, nothing )
78
+ push! (undirected, nothing )
79
+ undirected[Edge (2 , 1 )] = nothing
80
+
81
+ @test ! is_directed (undirected)
82
+ @test mktemp () do file, io
83
+ savegraph (file, undirected, DOTFormat ())
84
+ read (file, String)
85
+ end == """
86
+ graph {
87
+ 1
88
+ 2
89
+ 1 -- 2
90
+ }
91
+ """
You can’t perform that action at this time.
0 commit comments