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.

  1. independentSetSize :: IndependentSet a b -> Int

    algebraic-graphs Algebra.Graph.Bipartite.AdjacencyMap.Algorithm

    The number of vertices in an independent set. Complexity: O(1) time.

  2. isIndependentSetOf :: (Ord a, Ord b) => (Set a, Set b) -> AdjacencyMap a b -> Bool

    algebraic-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
    

  3. maxIndependentSet :: (Ord a, Ord b) => AdjacencyMap a b -> IndependentSet a b

    algebraic-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
    

  4. newtype PowerSet a

    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)
    

  5. PowerSet :: Set a -> PowerSet a

    algebraic-graphs Algebra.Graph.Label

    No documentation available.

  6. getPowerSet :: PowerSet a -> Set a

    algebraic-graphs Algebra.Graph.Label

    No documentation available.

  7. 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)
    

  8. vertexSet :: Ord a => Graph e a -> Set a

    algebraic-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
    

  9. 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)
    

  10. postSet :: Ord a => a -> AdjacencyMap e a -> Set a

    algebraic-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
    

Page 1627 of many | Previous | Next