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

[FIX] adding more params.

parent 1c636112
-- This file has been generated from package.yaml by hpack version 0.28.2.
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.31.2.
--
-- see: https://github.com/sol/hpack
--
-- hash: c6cbb5a936351b947ef7587a076b5b97dc259c91048519e5fc0abdfae9f0e4b8
-- hash: ac125dcd62ed660802d411f36f51aa061b920436175667d9972e2390e02b60e0
name: clustering-louvain
version: 0.1.0.0
......@@ -15,7 +17,6 @@ copyright: Copyright: (c) 2017-2018: see git logs and README
license: BSD3
license-file: LICENSE
build-type: Simple
cabal-version: >= 1.10
library
hs-source-dirs:
......
......@@ -15,28 +15,26 @@ git clone https://gitlab.iscpif.fr/gargantext/clustering-louvain-cplusplus
module Data.Graph.Clustering.Louvain.CplusPlus
where
import qualified Data.List as L
import Data.Map.Strict (Map, toList)
import Data.Monoid ((<>))
import Data.Maybe (maybe)
import qualified Control.Foldl as Fold
import qualified Turtle as TU
import System.IO
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Text (unpack)
import System.IO
import qualified Control.Foldl as Fold
import qualified Data.List as L
import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Turtle as TU
data LouvainNode = LouvainNode { l_node_id :: Int
, l_community_id :: Int
} deriving (Show)
cLouvain :: Map (Int, Int) Double -> IO [LouvainNode]
cLouvain ms = do
cLouvain :: Text -> Map (Int, Int) Double -> IO [LouvainNode]
cLouvain params ms = do
let inFileD = "/tmp/louvainData.txt"
let inFileW = "/tmp/louvainWeights.weights"
let outBin = "/tmp/louvainGraph.bin"
......@@ -48,7 +46,7 @@ cLouvain ms = do
let hierarchy = "/usr/share/louvain/hierarchy"
writeInput inFileD ms
let cmdLouvain = louvain <> " " <> inFileD <> " " <> inFileW <> " " <> outBin <> " " <> outTree
let cmdLouvain = louvain <> " " <> inFileD <> " " <> unpack params <> " " <> inFileW <> " " <> outBin <> " " <> outTree
let cmdHierarchy = hierarchy <> " " <> outTree <> " -l 1 > " <> outRes
--pure cmdLouvain
shell (T.pack cmdLouvain)
......
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