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. vertexSet :: Ord a => Graph a -> Set a

    algebraic-graphs Algebra.Graph

    The set of vertices of a given graph. Complexity: O(s * log(n)) time and O(n) memory. Good consumer.

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

  2. edgeSet :: Eq a => AdjacencyMap a -> Set (a, a)

    algebraic-graphs Algebra.Graph.Acyclic.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 (shrink $ 1 * 2) == Set.singleton (1,2)
    

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

    algebraic-graphs Algebra.Graph.Acyclic.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 1 (shrink $ 1 * 2) == Set.fromList [2]
    postSet 2 (shrink $ 1 * 2) == Set.empty
    Set.member x . postSet x   == const False
    

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

    algebraic-graphs Algebra.Graph.Acyclic.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 (shrink $ 1 * 2) == Set.empty
    preSet 2 (shrink $ 1 * 2) == Set.fromList [1]
    Set.member x . preSet x   == const False
    

  5. vertexSet :: AdjacencyMap a -> Set a

    algebraic-graphs Algebra.Graph.Acyclic.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 :: AdjacencyIntMap -> Set (Int, Int)

    algebraic-graphs Algebra.Graph.AdjacencyIntMap

    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
    

  7. fromAdjacencyIntSets :: [(Int, IntSet)] -> AdjacencyIntMap

    algebraic-graphs Algebra.Graph.AdjacencyIntMap

    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.

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

  8. postIntSet :: Int -> AdjacencyIntMap -> IntSet

    algebraic-graphs Algebra.Graph.AdjacencyIntMap

    The postset (here postIntSet) of a vertex is the set of its direct successors.

    postIntSet x empty      == IntSet.empty
    postIntSet x (vertex x) == IntSet.empty
    postIntSet x (edge x y) == IntSet.fromList [y]
    postIntSet 2 (edge 1 2) == IntSet.empty
    

  9. preIntSet :: Int -> AdjacencyIntMap -> IntSet

    algebraic-graphs Algebra.Graph.AdjacencyIntMap

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

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

  10. vertexIntSet :: AdjacencyIntMap -> IntSet

    algebraic-graphs Algebra.Graph.AdjacencyIntMap

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

    vertexIntSet empty      == IntSet.empty
    vertexIntSet . vertex   == IntSet.singleton
    vertexIntSet . vertices == IntSet.fromList
    vertexIntSet . clique   == IntSet.fromList
    

Page 1625 of many | Previous | Next