edges 0.5 → 0.6
raw patch · 4 files changed
+5/−8 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Edges.Data: Edge :: Int -> Word32 -> Edge source target
- Edges.Data: data Edge source target
- Edges.Folds: edgeCounts :: Amount a -> Fold (Edge a b) (EdgeCounts a b)
+ Edges.Folds: edgeCounts :: Amount a -> Fold (Node a, Node b) (EdgeCounts a b)
- Edges.Folds: edges :: EdgeCounts a b -> Amount b -> Fold (Edge a b) (Edges a b)
+ Edges.Folds: edges :: EdgeCounts a b -> Amount b -> Fold (Node a, Node b) (Edges a b)
Files
- edges.cabal +1/−1
- library/Edges/Data.hs +0/−1
- library/Edges/Folds.hs +4/−4
- library/Edges/Types.hs +0/−2
edges.cabal view
@@ -1,7 +1,7 @@ name: edges version:- 0.5+ 0.6 category: Graphs synopsis:
library/Edges/Data.hs view
@@ -3,7 +3,6 @@ Edges, Node(..), NodeCounts,- Edge(..), EdgeCounts, Amount(..), module Functions,
library/Edges/Folds.hs view
@@ -8,14 +8,14 @@ import qualified PrimitiveExtras.PrimMultiArray as PrimMultiArray -edgeCounts :: Amount a -> Fold (Edge a b) (EdgeCounts a b)+edgeCounts :: Amount a -> Fold (Node a, Node b) (EdgeCounts a b) edgeCounts (Amount amountInt) = dimap edgeSourceIndex EdgeCounts (PrimArray.indexCountsFold amountInt) where- edgeSourceIndex (Edge sourceIndex _) = sourceIndex+ edgeSourceIndex (Node sourceIndex, _) = sourceIndex -edges :: EdgeCounts a b -> Amount b -> Fold (Edge a b) (Edges a b)+edges :: EdgeCounts a b -> Amount b -> Fold (Node a, Node b) (Edges a b) edges (EdgeCounts edgeCountsPrimArray) (Amount bAmountInt) = dimap edgePair (Edges bAmountInt) (PrimMultiArray.fold edgeCountsPrimArray) where- edgePair (Edge sourceIndex targetIndex) = (sourceIndex, targetIndex)+ edgePair (Node sourceIndex, Node targetIndex) = (sourceIndex, fromIntegral targetIndex)
library/Edges/Types.hs view
@@ -14,8 +14,6 @@ newtype EdgeCounts source target = EdgeCounts (PrimArray Word32) -data Edge source target = Edge Int Word32- {-| Total amount of unique entities of the type -}