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. edgeSet :: Eq a => AdjacencyMap a -> Set (a, a)

    algebraic-graphs Algebra.Graph.AdjacencyMap

    The set of edges of a given graph. Complexity: O((n + m) * log(m)) time and O(m) memory.

    edgeSet empty      == Set.empty
    edgeSet (vertex x) == Set.empty
    edgeSet (edge x y) == Set.singleton (x,y)
    edgeSet . edges    == Set.fromList
    

  2. fromAdjacencySets :: Ord a => [(a, Set a)] -> AdjacencyMap a

    algebraic-graphs Algebra.Graph.AdjacencyMap

    Construct a graph from a list of adjacency sets; a variation of stars. Complexity: O((n + m) * log(n)) time and O(n + m) memory.

    fromAdjacencySets []                                  == empty
    fromAdjacencySets [(x, Set.empty)]                    == vertex x
    fromAdjacencySets [(x, Set.singleton y)]              == edge x y
    fromAdjacencySets . map (fmap Set.fromList)           == stars
    overlay (fromAdjacencySets xs) (fromAdjacencySets ys) == fromAdjacencySets (xs ++ ys)
    

  3. postSet :: Ord a => a -> AdjacencyMap a -> Set a

    algebraic-graphs Algebra.Graph.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 x y) == Set.fromList [y]
    postSet 2 (edge 1 2) == Set.empty
    

  4. preSet :: Ord a => a -> AdjacencyMap a -> Set a

    algebraic-graphs Algebra.Graph.AdjacencyMap

    The preset of an element x is the set of its direct predecessors. Complexity: O(n * log(n)) time and O(n) memory.

    preSet x empty      == Set.empty
    preSet x (vertex x) == Set.empty
    preSet 1 (edge 1 2) == Set.empty
    preSet y (edge x y) == Set.fromList [x]
    

  5. vertexSet :: AdjacencyMap a -> Set a

    algebraic-graphs Algebra.Graph.AdjacencyMap

    The set of vertices of a given graph. Complexity: O(n) time and memory.

    vertexSet empty      == Set.empty
    vertexSet . vertex   == Set.singleton
    vertexSet . vertices == Set.fromList
    

  6. edgeSet :: (Ord a, Ord b) => AdjacencyMap a b -> Set (a, b)

    algebraic-graphs Algebra.Graph.Bipartite.AdjacencyMap

    The set of edges of a graph. Complexity: O(n + m) time and O(m) memory.

    edgeSet empty      == Set.empty
    edgeSet (vertex x) == Set.empty
    edgeSet (edge x y) == Set.singleton (x,y)
    edgeSet . edges    == Set.fromList
    

  7. leftVertexSet :: AdjacencyMap a b -> Set a

    algebraic-graphs Algebra.Graph.Bipartite.AdjacencyMap

    The set of vertices of the left part of a graph. Complexity: O(l) time and memory.

    leftVertexSet empty              == Set.empty
    leftVertexSet . leftVertex       == Set.singleton
    leftVertexSet . rightVertex      == const Set.empty
    leftVertexSet . flip vertices [] == Set.fromList
    

  8. rightVertexSet :: AdjacencyMap a b -> Set b

    algebraic-graphs Algebra.Graph.Bipartite.AdjacencyMap

    The set of vertices of the right part of a graph. Complexity: O(r) time and memory.

    rightVertexSet empty         == Set.empty
    rightVertexSet . leftVertex  == const Set.empty
    rightVertexSet . rightVertex == Set.singleton
    rightVertexSet . vertices [] == Set.fromList
    

  9. vertexSet :: (Ord a, Ord b) => AdjacencyMap a b -> Set (Either a b)

    algebraic-graphs Algebra.Graph.Bipartite.AdjacencyMap

    The set of vertices of a graph. Complexity: O(n) time and memory.

    vertexSet empty                             == Set.empty
    vertexSet . vertex                          == Set.singleton
    vertexSet (edge x y)                        == Set.fromList [Left x, Right y]
    vertexSet (vertices (lefts xs) (rights xs)) == Set.fromList xs
    

  10. type IndependentSet a b = (Set a, Set b)

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

    An independent set of a bipartite graph. An independent set is a subset of vertices such that no two of them are adjacent. We represent independent sets by storing two sets of vertices, one for each part. An equivalent representation, which is slightly less memory efficient, is Set (Either a b).

Page 1626 of many | Previous | Next