Commit 4a63c422 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[ILouvain] with loop number

parent a7ca326b
......@@ -34,11 +34,9 @@ toNodes g = map (hnodes g) (nodes g)
iLouvain :: (Eq a, Show a)
=> Int -> HyperGraph a a -> HyperGraph a a
iLouvain 0 g = g
iLouvain 1 g = (iLouvain' g g)
iLouvain 2 g = iLouvain' g (iLouvain 1 g)
iLouvain 3 g = iLouvain' g (iLouvain 2 g)
iLouvain 4 g = iLouvain' g (iLouvain 3 g)
iLouvain 5 g = iLouvain' g (iLouvain 4 g)
iLouvain n g = iLouvain' g (iLouvain (n-1) g)
iLouvain' :: (Eq a, Show a)
=> HyperGraph a a
......@@ -83,8 +81,8 @@ step :: Show a
-> Node
-> HyperGraph a a
step g g' n1 n2 = -- trace ("step" :: Text) $
-- if s2 > 0 && s2 >= s1
if s2 >= s1
if s2 > 0 && s2 >= s1
-- if s2 >= s1
then -- trace ("step:mv" :: Text) $
mv g' [n1] [n2]
else -- trace ("step:else" :: Text) $
......
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