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.
preSet :: Ord a => a -> Relation a -> Set aalgebraic-graphs Algebra.Graph.Relation The preset of an element x is the set of elements that are related to it on the left, i.e. preSet x == { a | aRx }. In the context of directed graphs, this corresponds to the set of direct predecessors of vertex x. Complexity: O(n + m) 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]
vertexSet :: Relation a -> Set aalgebraic-graphs Algebra.Graph.Relation The set of vertices of a given graph. Complexity: O(1) time.
vertexSet empty == Set.empty vertexSet . vertex == Set.singleton vertexSet . vertices == Set.fromList
edgeSet :: Ord a => Relation a -> Set (a, a)algebraic-graphs Algebra.Graph.Relation.Symmetric The set of edges of a given graph, where edge vertices appear in the non-decreasing order. Complexity: O(m) time. Note: If you need the set of edges where an edge appears in both directions, use relation . fromSymmetric. The latter is much faster than this function, and takes only O(1) time and memory.
edgeSet empty == Set.empty edgeSet (vertex x) == Set.empty edgeSet (edge x y) == Set.singleton (min x y, max x y)
vertexSet :: Relation a -> Set aalgebraic-graphs Algebra.Graph.Relation.Symmetric The set of vertices of a given graph. Complexity: O(1) time.
vertexSet empty == Set.empty vertexSet . vertex == Set.singleton vertexSet . vertices == Set.fromList
edgeSet :: ToGraph t => t -> Set (ToVertex t, ToVertex t)algebraic-graphs Algebra.Graph.ToGraph The set of edges of a graph.
edgeSet == Algebra.Graph.AdjacencyMap.edgeSet . toAdjacencyMap
postIntSet :: ToGraph t => Int -> t -> IntSetalgebraic-graphs Algebra.Graph.ToGraph The postset (here postIntSet) of a vertex is the set of its direct successors. Like postSet but specialised for graphs with vertices of type Int.
postIntSet x == Algebra.Graph.AdjacencyIntMap.postIntSet x . toAdjacencyIntMap
postSet :: ToGraph t => ToVertex t -> t -> Set (ToVertex t)algebraic-graphs Algebra.Graph.ToGraph The postset of a vertex is the set of its direct successors.
postSet x == Algebra.Graph.AdjacencyMap.postSet x . toAdjacencyMap
preIntSet :: ToGraph t => Int -> t -> IntSetalgebraic-graphs Algebra.Graph.ToGraph The preset (here preIntSet) of a vertex is the set of its direct predecessors. Like preSet but specialised for graphs with vertices of type Int.
preIntSet x == Algebra.Graph.AdjacencyIntMap.preIntSet x . toAdjacencyIntMap
preSet :: ToGraph t => ToVertex t -> t -> Set (ToVertex t)algebraic-graphs Algebra.Graph.ToGraph The preset of a vertex is the set of its direct predecessors.
preSet x == Algebra.Graph.AdjacencyMap.preSet x . toAdjacencyMap
vertexIntSet :: ToGraph t => t -> IntSetalgebraic-graphs Algebra.Graph.ToGraph The set of vertices of a graph. Like vertexSet but specialised for graphs with vertices of type Int.
vertexIntSet == foldg IntSet.empty IntSet.singleton IntSet.union IntSet.union