-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Tools for efficient immutable graphs -- -- A set of tools for constructing immutable graphs which are both memory -- and performance-efficient. @package edges @version 0.8 module Edges.Potoki.Transforms -- | Node counts paired with the source nodes. executeNodeCountQuery :: (Node a -> NodeCounts b) -> Transform (Node a) (Node a, NodeCounts b) module Edges.Potoki.Produces -- | Enumerate nodes. nodes :: Amount a -> Produce (Node a) -- | Node counts paired with the source nodes. nodeCounts :: Amount a -> (Node a -> NodeCounts b) -> Produce (Node a, NodeCounts b) readNodeCountsFromFile :: FilePath -> Produce (Either IOException (Either Text (Node a, NodeCounts b))) module Edges.NodeCounting data NodeCounts entity data Node entity -- | Total amount of unique entities of the type data Amount entity data Edges source target node :: Edges source target -> Node source -> NodeCounts source nodeTargets :: Edges source target -> Node source -> NodeCounts target -- | Count the occurrences of targets based on the occurrences of sources. targets :: Edges source target -> NodeCounts source -> NodeCounts target module Edges.Data data Edges source target newtype Node entity Node :: Int -> Node entity data NodeCounts entity data EdgeCounts source target -- | Total amount of unique entities of the type newtype Amount entity Amount :: Int -> Amount entity edgesSourceAmount :: Edges source x -> Amount source edgesTargetAmount :: Edges x target -> Amount target edgesUnfoldM :: Monad m => Edges a b -> UnfoldM m (Node a, Node b) edgesList :: Edges a b -> [(Node a, Node b)] listEdges :: [(Node a, Node b)] -> Edges a b listBipartiteEdges :: [(Node a, Node b)] -> (Edges a b, Edges b a) primListBipartiteEdges :: [(Int, Int)] -> (Edges a b, Edges b a) primFoldableWithAmountsEdges :: Foldable f => Int -> Int -> f (Int, Word32) -> Edges a b nodeCountsList :: NodeCounts entity -> [Word32] nodeCountsUnboxedVector :: NodeCounts entity -> Vector Word32 module Edges.IO encodeNodeCountsToFile :: FilePath -> Amount a -> (Node a -> NodeCounts z) -> IO (Either IOException ()) module Edges.Gens nodeWithLimit :: Int -> Gen (Node a) bipartiteEdgesWithLimits :: Int -> Int -> Gen (Edges a b, Edges b a) module Edges.Folds edgeCounts :: Amount a -> Fold (Node a, Node b) (EdgeCounts a b) edges :: EdgeCounts a b -> Amount b -> Fold (Node a, Node b) (Edges a b)