Skip to content

Commit f171537

Browse files
committed
Make induced_subgraph work on DiCMOBiGraph
1 parent a63c0ad commit f171537

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/bipartite_graph.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,8 @@ end
733733

734734
Graphs.has_edge(g::DiCMOBiGraph{true}, a, b) = a in inneighbors(g, b)
735735
Graphs.has_edge(g::DiCMOBiGraph{false}, a, b) = b in outneighbors(g, a)
736+
# This definition is required for `induced_subgraph` to work
737+
(::Type{<:DiCMOBiGraph})(n::Integer) = SimpleDiGraph(n)
736738

737739
# Condensation Graphs
738740
abstract type AbstractCondensationGraph <: AbstractGraph{Int} end

0 commit comments

Comments
 (0)