Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clustering-louvain
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
clustering-louvain
Commits
c3c1e31e
Commit
c3c1e31e
authored
Mar 31, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ILouvain] more func/instances to be defined.
parent
b8c4566e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
ILouvain.hs
src/Data/Graph/Clustering/ILouvain.hs
+12
-4
No files found.
src/Data/Graph/Clustering/ILouvain.hs
View file @
c3c1e31e
...
@@ -159,10 +159,11 @@ class IsHyperGraph a where
...
@@ -159,10 +159,11 @@ class IsHyperGraph a where
imodularity_
::
a
->
a
->
[
Node
]
->
Double
imodularity_
::
a
->
a
->
[
Node
]
->
Double
gmodularity_
::
a
->
a
->
Double
gmodularity_
::
a
->
a
->
Double
toHyperGraph_
::
Gr
()
Double
->
a
toHyperGraph_
::
Gr
()
Double
->
a
toNodes_
::
a
->
[
Node
]
toNodes_
::
a
->
[[
Node
]]
isFlat_
::
a
->
Bool
isFlat_
::
a
->
Bool
------------------------------------------------------------------------
------------------------------------------------------------------------
hnodes
::
HyperGraph
a
b
->
Node
->
[
Node
]
hnodes
::
HyperGraph
a
b
->
Node
->
[
Node
]
hnodes
g
n
=
case
match
n
g
of
hnodes
g
n
=
case
match
n
g
of
(
Nothing
,
_
)
->
[]
(
Nothing
,
_
)
->
[]
...
@@ -170,15 +171,22 @@ hnodes g n = case match n g of
...
@@ -170,15 +171,22 @@ hnodes g n = case match n g of
hnodes'
::
HyperGraph'
a
b
c
->
Node
->
[
Node
]
hnodes'
::
HyperGraph'
a
b
c
->
Node
->
[
Node
]
hnodes'
g
n
=
concat
$
map
(
hnodes
g
)
$
hnodes
g
n
hnodes'
g
n
=
concat
$
map
(
hnodes
g
)
$
hnodes
g
n
------------------------------------------------------------------------
------------------------------------------------------------------------
toNodes
::
HyperGraph
a
a
->
[[
Node
]]
toNodes
::
HyperGraph
a
a
->
[[
Node
]]
toNodes
g
=
map
(
hnodes
g
)
(
nodes
g
)
toNodes
g
=
map
(
hnodes
g
)
(
nodes
g
)
toNodes'
::
HyperGraph'
a
b
c
->
[[
Node
]]
toNodes'
g
=
map
(
hnodes'
g
)
(
nodes
g
)
------------------------------------------------------------------------
isFlat
::
HyperGraph
a
b
->
Bool
isFlat
::
HyperGraph
a
b
->
Bool
isFlat
g
=
all
(
isEmpty
.
snd
)
(
labNodes
g
)
isFlat
g
=
all
(
isEmpty
.
snd
)
(
labNodes
g
)
-- flatten
{-
isFlat' :: HyperGraph' a b c-> Bool
isFlat' g = all (isFlat . concat . (map nodes) . snd) (labNodes g)
-}
{-
{-
hdeg :: Graph gr => gr a b -> Node -> Maybe Int
hdeg :: Graph gr => gr a b -> Node -> Maybe Int
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment