Commit 54343c54 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[Minor] adding type signature

parent 1851c3ee
......@@ -118,6 +118,7 @@ step (p, v, l, s) cgr = cgr
where
mNc = nodeCommunity v cgr
ncs = nodeNeighbours v cgr
-- We move node from community nc into ncs
moves :: Maybe (LNode Community, [LNode Community])
moves = case mNc of
......@@ -177,11 +178,12 @@ moveNodeWithNeighbours :: Adj FEdge -> Node -> Direction -> Community -> Communi
moveNodeWithNeighbours lnNeighbors n direction (Community (ns, inwsum, totwsum)) =
Community (newNs, newInWsum, newTotWsum)
where
newNs :: [Node]
newNs = case direction of
Into -> n:ns
OutOf -> DL.delete n ns
newInWsum, newTotWsum :: Double
newInWsum = inwsum + directionN * sumN
newTotWsum = totwsum + directionN * (sumN - sumNonCom)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment