Hoogle Search
Within LTS Haskell 24.68 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
gmap :: Ord b => (a -> b) -> Relation a -> Relation balgebraic-graphs Algebra.Graph.Relation Transform a graph by applying a function to each of its vertices. This is similar to Functor's fmap but can be used with non-fully-parametric Relation. Complexity: O((n + m) * log(n)) time.
gmap f empty == empty gmap f (vertex x) == vertex (f x) gmap f (edge x y) == edge (f x) (f y) gmap id == id gmap f . gmap g == gmap (f . g)
gmap :: Ord b => (a -> b) -> Relation a -> Relation balgebraic-graphs Algebra.Graph.Relation.Symmetric Transform a graph by applying a function to each of its vertices. This is similar to Functor's fmap but can be used with non-fully-parametric Relation. Complexity: O((n + m) * log(n)) time.
gmap f empty == empty gmap f (vertex x) == vertex (f x) gmap f (edge x y) == edge (f x) (f y) gmap id == id gmap f . gmap g == gmap (f . g)
adjacencyIntMap :: (ToGraph t, ToVertex t ~ Int) => t -> IntMap IntSetalgebraic-graphs Algebra.Graph.ToGraph The adjacency map of a graph: each vertex is associated with a set of its direct successors. Like adjacencyMap but specialised for graphs with vertices of type Int.
adjacencyIntMap == Algebra.Graph.AdjacencyIntMap.adjacencyIntMap . toAdjacencyIntMap
adjacencyIntMapTranspose :: (ToGraph t, ToVertex t ~ Int) => t -> IntMap IntSetalgebraic-graphs Algebra.Graph.ToGraph The transposed adjacency map of a graph: each vertex is associated with a set of its direct predecessors. Like adjacencyMapTranspose but specialised for graphs with vertices of type Int.
adjacencyIntMapTranspose == Algebra.Graph.AdjacencyIntMap.adjacencyIntMap . toAdjacencyIntMapTranspose
adjacencyMap :: (ToGraph t, Ord (ToVertex t)) => t -> Map (ToVertex t) (Set (ToVertex t))algebraic-graphs Algebra.Graph.ToGraph The adjacency map of a graph: each vertex is associated with a set of its direct successors.
adjacencyMap == Algebra.Graph.AdjacencyMap.adjacencyMap . toAdjacencyMap
adjacencyMapTranspose :: (ToGraph t, Ord (ToVertex t)) => t -> Map (ToVertex t) (Set (ToVertex t))algebraic-graphs Algebra.Graph.ToGraph The transposed adjacency map of a graph: each vertex is associated with a set of its direct predecessors.
adjacencyMapTranspose == Algebra.Graph.AdjacencyMap.adjacencyMap . toAdjacencyMapTranspose
toAdjacencyIntMap :: ToGraph t => t -> AdjacencyIntMapalgebraic-graphs Algebra.Graph.ToGraph Convert a value to the corresponding AdjacencyIntMap.
toAdjacencyIntMap == foldg empty vertex overlay connect
toAdjacencyIntMapTranspose :: ToGraph t => t -> AdjacencyIntMapalgebraic-graphs Algebra.Graph.ToGraph Convert a value to the corresponding AdjacencyIntMap and transpose the result.
toAdjacencyIntMapTranspose == foldg empty vertex overlay (flip connect)
toAdjacencyMap :: ToGraph t => t -> AdjacencyMap (ToVertex t)algebraic-graphs Algebra.Graph.ToGraph Convert a value to the corresponding AdjacencyMap.
toAdjacencyMap == foldg empty vertex overlay connect
toAdjacencyMapTranspose :: ToGraph t => t -> AdjacencyMap (ToVertex t)algebraic-graphs Algebra.Graph.ToGraph Convert a value to the corresponding AdjacencyMap and transpose the result.
toAdjacencyMapTranspose == foldg empty vertex overlay (flip connect)