1 module Gargantext.Core.Viz.Graph.Tools.Infomap where
7 import qualified Data.Graph.Infomap as I
8 import qualified Data.Graph.Infomap.Internal as I
11 infomap :: String -> Map (Int, Int) Double -> IO [ClusterNode]
12 infomap infomapCfg gr = map mkClustNode <$> I.infomap infomapCfg gr
14 where mkClustNode (I.CNode nid cid) =
15 ClusterNode (fromIntegral nid) (fromIntegral cid)