Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/metagraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,7 @@ This can be useful to interpret the results of methods inherited from `Graphs`.
function label_for(meta_graph::MetaGraph, code::Integer)
return meta_graph.vertex_labels[code]
end

function transitiveclosure!(meta_graph::MetaGraph, selflooped=false)
throw(ArgumentError("transitiveclosure! not implemented for type MetaGraph"))
end
7 changes: 7 additions & 0 deletions test/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,10 @@ end
(from, to) = first(edge_labels(graph))
@test graph[from, to] === 1
end

@testset "No transitiveclosure! for MetaGraph" begin
graph = MetaGraph(
complete_graph(2), ["3" => nothing, "2" => nothing], [("3", "2") => 1]
)
@test_throws ArgumentError transitiveclosure!(graph)
end
Loading