Commit 331ffc70 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] Clustering improvement

parent f11abb76
Pipeline #3715 failed with stage
in 90 minutes and 5 seconds
...@@ -127,11 +127,11 @@ bridgeness :: Bridgeness ...@@ -127,11 +127,11 @@ bridgeness :: Bridgeness
-> Map (NodeId, NodeId) Double -> Map (NodeId, NodeId) Double
-> Map (NodeId, NodeId) Double -> Map (NodeId, NodeId) Double
bridgeness (Bridgeness_Recursive sn f) m = bridgeness (Bridgeness_Recursive sn f) m =
Map.unions $ [linksBetween] <> map (\s -> bridgeness (Bridgeness_Basic (setNodes2clusterNodes s) f) m') sn Map.unions $ [linksBetween] <> map (\s -> bridgeness (Bridgeness_Basic (setNodes2clusterNodes s) (pi*f)) m') sn
where where
(linksBetween, m') = Map.partitionWithKey (\(n1,n2) _v -> Map.lookup n1 mapNodeIdClusterId (linksBetween, m') = Map.partitionWithKey (\(n1,n2) _v -> Map.lookup n1 mapNodeIdClusterId
/= Map.lookup n2 mapNodeIdClusterId /= Map.lookup n2 mapNodeIdClusterId
) $ bridgeness (Bridgeness_Basic clusters (pi*f)) m ) $ bridgeness (Bridgeness_Basic clusters f) m
clusters = setNodes2clusterNodes (map Set.unions sn) clusters = setNodes2clusterNodes (map Set.unions sn)
mapNodeIdClusterId = clusterNodes2map clusters mapNodeIdClusterId = clusterNodes2map clusters
......
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