Etage-Graph 0.1.2 → 0.1.4
raw patch · 3 files changed
+10/−5 lines, 3 filesdep ~Etage-Graph
Dependency ranges changed: Etage-Graph
Files
- Etage-Graph.cabal +7/−2
- lib/Data/Graph/Etage.hs +2/−1
- src/Test.hs +1/−2
Etage-Graph.cabal view
@@ -1,5 +1,5 @@ Name: Etage-Graph-Version: 0.1.2+Version: 0.1.4 Synopsis: Data-flow based graph algorithms Description: Data-flow based graph algorithms using the "Control.Etage" framework, showcasing its use for data-flow computations. It is meant to be used with the "Data.Graph.Inductive" package which provides graph structures@@ -32,6 +32,10 @@ GHC-prof-options: -Wall GHC-shared-options: -Wall +Source-repository head+ type: mercurial+ location: https://bitbucket.org/mitar/etage-graph+ Executable etage-graph-test Main-is: Test.hs HS-source-dirs: src@@ -45,5 +49,6 @@ time >= 1.1 && < 2, parallel >= 3.1 && < 4, Etage == 0.1.8,- Etage-Graph == 0.1.2+ Etage-Graph == 0.1.4+ GHC-options: -Wall -rtsopts -threaded
lib/Data/Graph/Etage.hs view
@@ -19,8 +19,9 @@ import qualified Data.Map as M import Data.Map hiding (filter, map, empty, null, lookup) import Data.Tuple-import Control.Etage import System.IO++import Control.Etage type SPath b = (LPath b, b) type SPaths a b = M.Map Node (a, SPath b) -- node is destination, last element of SPath
src/Test.hs view
@@ -81,8 +81,7 @@ es <- fmap concat $ forM [1..graphSize] $ \node -> do nedges <- randomRIO (0, graphSize) others <- fmap (filter (node /=) . nub) $ forM [1..nedges] $ \_ -> randomRIO (1, graphSize)- gen <- getStdGen- let weights = randomRs (1, 10) gen+ weights <- replicateM (length others) $ randomRIO (1, 10) return $ zip3 (repeat node) others weights return $ mkGraph ns es