]> Git — Sourcephile - gargantext.git/blob - src/Gargantext/Core/Viz/Graph/Tools/Infomap.hs
[FIX] Removing Recursive Clustering for Order 2
[gargantext.git] / src / Gargantext / Core / Viz / Graph / Tools / Infomap.hs
1 module Gargantext.Core.Viz.Graph.Tools.Infomap where
2
3 import Data.Map.Strict (Map)
4 import Graph.Types
5 import Prelude
6
7 import qualified Data.Graph.Infomap as I
8 import qualified Data.Graph.Infomap.Internal as I
9
10
11 infomap :: String -> Map (Int, Int) Double -> IO [ClusterNode]
12 infomap infomapCfg gr = map mkClustNode <$> I.infomap infomapCfg gr
13
14 where mkClustNode (I.CNode nid cid) =
15 ClusterNode (fromIntegral nid) (fromIntegral cid)