From fe7b575800f02d7aac8ed9ece0f36eec5aae8a18 Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Wed, 18 Dec 2013 09:22:19 +0100 Subject: [PATCH] i accidentally factor 10.. --- src/DCB/DCB.hs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/DCB/DCB.hs b/src/DCB/DCB.hs index 4537b51..b9158ba 100644 --- a/src/DCB/DCB.hs +++ b/src/DCB/DCB.hs @@ -248,17 +248,18 @@ addPoint :: Adj -- ^ global adjacency matrix of all nodes -> Maybe Graph addPoint adj attr d div req g@(nodes, _, dens) n = let - (! constr,! densNew) = (constraint attr div req g n,updateDensity adj nodes n dens) + (constr, densNew) = (constraint attr div req g n,updateDensity adj nodes n dens) -- +|| (parTuple2 rdeepseq rdeepseq) in - case constr of - Nothing -> Nothing - (Just c@(ful,constr)) -> - --trace (B.unpack $ outputArray constr) $ - case densNew >= d of - True -> Just {-$ trace ("submitting graph:\n================\n " P.++ (B.unpack $ outputGraph [(A.computeS $nodes ++ A.fromListUnboxed (ix1 1) [n], c, densNew)])) -} + case densNew >= d of + False -> Nothing + True -> + case constr of + Nothing -> Nothing + (Just c@(ful,constr)) -> + --trace (B.unpack $ outputArray constr) $ + Just {-$ trace ("submitting graph:\n================\n " P.++ (B.unpack $ outputGraph [(A.computeS $nodes ++ A.fromListUnboxed (ix1 1) [n], c, densNew)])) -} (A.computeUnboxedS $nodes ++ A.fromListUnboxed (ix1 1) [n], c, densNew) - False -> Nothing reduceDim :: (A.Shape sh, Integral a) => (sh :. a) -> sh reduceDim (a :. b) = a --A.shapeOfList $ tail $ A.listOfShape a