Back

bipartite-subgraph (clj)

(source)

function

(bipartite-subgraph g subset)
Returns the subgraph of g containing only the edge subset E which lead outside of the given subset. The nodes of the resulting graph are the start and endpoints of these edges. The resulting graph is thus the bipartite graph (U,V,E) where U = subset, V = (map last E). (see https://en.wikipedia.org/wiki/Bipartite_graph).

Examples