hgraph-1.10.0.0: Tools for working on (di)graphs.
Safe HaskellSafe-Inferred
LanguageHaskell2010

HGraph.Directed.Connectivity.Flow

Synopsis

Documentation

isWellLinkedTo :: (Ord k, Mutable t, DirectedGraph t, Adjacency t) => t k -> [k] -> [k] -> Bool Source #

Is the vertex set A well-linked to the vertex set B? That is, is there, for every subset A' of A, some subset B' of B of the same size such that there is a linkage from A' to B' containing as many paths as there are vertices in A'?

maxDisjointPaths :: (Mutable t, DirectedGraph t, Adjacency t, Integral a) => t a -> a -> a -> [[a]] Source #

maxArcDisjointPaths :: (Mutable t, DirectedGraph t, Adjacency t, Integral a) => t a -> a -> a -> [[a]] Source #

maxFlow :: (Ord a, Adjacency t, DirectedGraph t) => t a -> a -> a -> Map (a, a) Bool Source #

maxFlowValue :: (Ord a, Adjacency t, DirectedGraph t) => t a -> a -> a -> Int Source #

minCut :: (Mutable t, DirectedGraph t, Adjacency t, Eq a) => t a -> a -> a -> [a] Source #

minCutI :: (Mutable t, DirectedGraph t, Adjacency t, Integral a) => t a -> a -> a -> [a] Source #

separableSets :: (Ord k, Mutable t, DirectedGraph t, Adjacency t) => t k -> [k] -> [k] -> Maybe ([Int], [Int]) Source #

Search for a subset A' of va and a subset B' of vb of the same size such that no linkage from A' to B' connecting all vertices in both sets exist.

separableSetsI :: forall {b} {t}. (Mutable t, DirectedGraph t, Integral b, Adjacency t) => t b -> [b] -> [b] -> Int -> Maybe ([b], [b]) Source #

cuttableSubsetI :: forall {a} {t}. (Adjacency t, DirectedGraph t, Integral a, Mutable t) => t a -> [a] -> [a] -> Int -> Maybe ([a], [a]) Source #

findWellLinkedSetI :: (Mutable t, DirectedGraph t, Adjacency t, Integral a) => t a -> Int -> Maybe ([a], [a]) Source #