Commit 1c636112 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] hierarchy (need to fix the binaries).

parent 1eb4f421
-- This file has been generated from package.yaml by hpack version 0.20.0. -- This file has been generated from package.yaml by hpack version 0.28.2.
-- --
-- see: https://github.com/sol/hpack -- see: https://github.com/sol/hpack
-- --
-- hash: 716223af4ecf0d8fb10f620eda2763c4dd15bb5a65fb15ca2bf2d416e052a9a4 -- hash: c6cbb5a936351b947ef7587a076b5b97dc259c91048519e5fc0abdfae9f0e4b8
name: clustering-louvain name: clustering-louvain
version: 0.1.0.0 version: 0.1.0.0
...@@ -38,38 +38,3 @@ library ...@@ -38,38 +38,3 @@ library
other-modules: other-modules:
Paths_clustering_louvain Paths_clustering_louvain
default-language: Haskell2010 default-language: Haskell2010
test-suite louvain-doctest
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs:
src-doctest
ghc-options: -Wall -Werror -threaded -rtsopts -with-rtsopts=-N -Wmissing-signatures
build-depends:
Glob
, QuickCheck
, base
, containers
, doctest
, extra
, louvain
, text
other-modules:
Paths_clustering_louvain
default-language: Haskell2010
test-suite louvain-test
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs:
src-test
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
build-depends:
base
, containers
, extra
, louvain
, text
other-modules:
Paths_clustering_louvain
default-language: Haskell2010
...@@ -34,29 +34,29 @@ library: ...@@ -34,29 +34,29 @@ library:
- hxt - hxt
- turtle - turtle
- foldl - foldl
tests: #tests:
louvain-test: # louvain-test:
main: Spec.hs # main: Spec.hs
source-dirs: src-test # source-dirs: src-test
ghc-options: # ghc-options:
- -threaded # - -threaded
- -rtsopts # - -rtsopts
- -with-rtsopts=-N # - -with-rtsopts=-N
dependencies: # dependencies:
- base # - base
- louvain # - louvain
louvain-doctest: # louvain-doctest:
main: Main.hs # main: Main.hs
source-dirs: src-doctest # source-dirs: src-doctest
ghc-options: # ghc-options:
- -Werror # - -Werror
- -threaded # - -threaded
- -rtsopts # - -rtsopts
- -with-rtsopts=-N # - -with-rtsopts=-N
- -Wmissing-signatures # - -Wmissing-signatures
dependencies: # dependencies:
- doctest # - doctest
- Glob # - Glob
- QuickCheck # - QuickCheck
- base # - base
- louvain # - louvain
...@@ -40,15 +40,23 @@ cLouvain ms = do ...@@ -40,15 +40,23 @@ cLouvain ms = do
let inFileD = "/tmp/louvainData.txt" let inFileD = "/tmp/louvainData.txt"
let inFileW = "/tmp/louvainWeights.weights" let inFileW = "/tmp/louvainWeights.weights"
let outBin = "/tmp/louvainGraph.bin" let outBin = "/tmp/louvainGraph.bin"
let outRes = "/tmp/louvainGraph.tree" let outTree = "/tmp/louvainGraph.tree"
let louvain = "/usr/share/louvain/louvain"
let outRes = "/tmp/louvainGraph.res"
let louvain = "/usr/share/louvain/louvain"
let hierarchy = "/usr/share/louvain/hierarchy"
writeInput inFileD ms writeInput inFileD ms
let cmdLouvain = louvain <> " " <> inFileD <> " " <> inFileW <> " " <> outBin <> " " <> outRes let cmdLouvain = louvain <> " " <> inFileD <> " " <> inFileW <> " " <> outBin <> " " <> outTree
let cmdHierarchy = hierarchy <> " " <> outTree <> " -l 1 > " <> outRes
--pure cmdLouvain --pure cmdLouvain
shell (T.pack cmdLouvain) shell (T.pack cmdLouvain)
shell (T.pack cmdHierarchy)
myResult <- readOutput outRes myResult <- readOutput outRes
let clean = "rm" <> " " <> L.intercalate " " [inFileD, inFileW, outBin, outTree, outRes]
pure myResult pure myResult
......
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