Commit fa7344cb authored by Alexandre Delanoë's avatar Alexandre Delanoë

[WIP]

parent 3676c91f
...@@ -21,7 +21,7 @@ module Gargantext.Core.Viz.Graph.Bridgeness -- (bridgeness) ...@@ -21,7 +21,7 @@ module Gargantext.Core.Viz.Graph.Bridgeness -- (bridgeness)
import Data.List (concat, sortOn) import Data.List (concat, sortOn)
import Data.Map (Map, fromListWith, lookup, toList, mapWithKey, elems) import Data.Map (Map, fromListWith, lookup, toList, mapWithKey, elems)
import Data.Maybe (catMaybes, fromMaybe) import Data.Maybe (catMaybes{-, fromMaybe-})
import Data.Set (Set) import Data.Set (Set)
import Gargantext.Prelude import Gargantext.Prelude
import Graph.Types (ClusterNode(..)) import Graph.Types (ClusterNode(..))
...@@ -72,7 +72,9 @@ bridgeness2 c m = Map.fromList ...@@ -72,7 +72,9 @@ bridgeness2 c m = Map.fromList
) )
$ List.take n $ List.take n
$ List.sortOn (Down . snd) $ List.sortOn (Down . snd)
$ Map.toList c $ catMaybes
$ map (\ks -> (,) <$> Just ks <*> Map.lookup ks c)
$ Map.keys m
!m' = Map.toList m !m' = Map.toList m
n :: Int n :: Int
......
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