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

[Doc]

parent b4481dfb
...@@ -29,7 +29,8 @@ import Data.Graph.Inductive ...@@ -29,7 +29,8 @@ import Data.Graph.Inductive
glustering :: DynGraph gr glustering :: DynGraph gr
=> gr a b => gr a b
-> [Module] -> [Module]
glustering = undefined glustering g = undefined
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- | Definitions -- | Definitions
...@@ -40,6 +41,7 @@ data Module = Module { node :: Node ...@@ -40,6 +41,7 @@ data Module = Module { node :: Node
, score :: Double , score :: Double
} }
-- | Divide en conquer method
modulare :: DynGraph gr modulare :: DynGraph gr
=> gr a b => gr a b
-> Module -> Module
...@@ -54,6 +56,7 @@ modulare g m0@(Module n ms0 _) m1@(m@(Module n1 _ _):ms) ...@@ -54,6 +56,7 @@ modulare g m0@(Module n ms0 _) m1@(m@(Module n1 _ _):ms)
score1 = sum $ map (modularity g) [m0, m] score1 = sum $ map (modularity g) [m0, m]
score2 = sum $ map (modularity g) ([m0]++ms) score2 = sum $ map (modularity g) ([m0]++ms)
-- | need to flatten the Tree of modules to get a list of nodes
flat :: Module -> [Node] flat :: Module -> [Node]
flat (Module n [] _) = [n] flat (Module n [] _) = [n]
flat (Module n ns _) = [n] ++ (concat $ map flat ns) flat (Module n ns _) = [n] ++ (concat $ map flat ns)
......
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