Hoogle Search
Within LTS Haskell 24.70 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
independentSetSize :: IndependentSet a b -> Intalgebraic-graphs Algebra.Graph.Bipartite.AdjacencyMap.Algorithm The number of vertices in an independent set. Complexity: O(1) time.
isIndependentSetOf :: (Ord a, Ord b) => (Set a, Set b) -> AdjacencyMap a b -> Boolalgebraic-graphs Algebra.Graph.Bipartite.AdjacencyMap.Algorithm Check if a given pair of sets is an independent set of a bipartite graph. Complexity: O(m * log(n)).
isIndependentSetOf (xs , ys ) empty == Set.null xs && Set.null ys isIndependentSetOf (xs , ys ) (leftVertex x) == Set.isSubsetOf xs (Set.singleton x) && Set.null ys isIndependentSetOf (Set.empty , Set.empty ) (edge x y) == True isIndependentSetOf (Set.singleton x, ys ) (edge x y) == Set.null ys isIndependentSetOf (xs , Set.singleton y) (edge x y) == Set.null xs
maxIndependentSet :: (Ord a, Ord b) => AdjacencyMap a b -> IndependentSet a balgebraic-graphs Algebra.Graph.Bipartite.AdjacencyMap.Algorithm Find a maximum independent set in a bipartite graph. An independent set is maximum if it has the largest possible size. Complexity: O(m * sqrt(n) * log(n)).
maxIndependentSet empty == (Set.empty, Set.empty) maxIndependentSet (vertices xs ys) == (Set.fromList xs, Set.fromList ys) maxIndependentSet (path [1,2,3]) == (Set.fromList [1,3], Set.empty) maxIndependentSet (star x (1:2:ys)) == (Set.empty, Set.fromList (1:2:ys)) independentSetSize (maxIndependentSet (biclique xs ys)) == max (length (nub xs)) (length (nub ys)) independentSetSize (maxIndependentSet x) == vertexCount x - vertexCoverSize (minVertexCover x) isIndependentSetOf (maxIndependentSet x) x == True
-
algebraic-graphs Algebra.Graph.Label The power set over the underlying set of elements a. If a is a monoid, then the power set forms a Dioid as follows:
zero = PowerSet Set.empty one = PowerSet $ Set.singleton mempty x <+> y = PowerSet $ Set.union (getPowerSet x) (getPowerSet y) x <.> y = PowerSet $ cartesianProductWith mappend (getPowerSet x) (getPowerSet y)
PowerSet :: Set a -> PowerSet aalgebraic-graphs Algebra.Graph.Label No documentation available.
getPowerSet :: PowerSet a -> Set aalgebraic-graphs Algebra.Graph.Label No documentation available.
edgeSet :: (Eq e, Monoid e, Ord a) => Graph e a -> Set (e, a, a)algebraic-graphs Algebra.Graph.Labelled The set of edges of a given graph. Complexity: O(n + m) time and O(m) memory.
edgeSet empty == Set.empty edgeSet (vertex x) == Set.empty edgeSet (edge e x y) == if e == zero then Set.empty else Set.singleton (e,x,y)
vertexSet :: Ord a => Graph e a -> Set aalgebraic-graphs Algebra.Graph.Labelled The set of vertices of a given graph. Complexity: O(s * log(n)) time and O(n) memory.
vertexSet empty == Set.empty vertexSet . vertex == Set.singleton vertexSet . vertices == Set.fromList
edgeSet :: (Eq a, Eq e) => AdjacencyMap e a -> Set (e, a, a)algebraic-graphs Algebra.Graph.Labelled.AdjacencyMap The set of edges of a given graph. Complexity: O(n + m) time and O(m) memory.
edgeSet empty == Set.empty edgeSet (vertex x) == Set.empty edgeSet (edge e x y) == if e == zero then Set.empty else Set.singleton (e,x,y)
postSet :: Ord a => a -> AdjacencyMap e a -> Set aalgebraic-graphs Algebra.Graph.Labelled.AdjacencyMap The postset of a vertex is the set of its direct successors. Complexity: O(log(n)) time and O(1) memory.
postSet x empty == Set.empty postSet x (vertex x) == Set.empty postSet x (edge e x y) == if e == zero then Set.empty else Set.fromList [y] postSet 2 (edge e 1 2) == Set.empty