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
54343c54
Commit
54343c54
authored
Mar 21, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Minor] adding type signature
parent
1851c3ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
FLouvain.hs
src/Data/Graph/Clustering/FLouvain.hs
+5
-3
No files found.
src/Data/Graph/Clustering/FLouvain.hs
View file @
54343c54
...
@@ -118,6 +118,7 @@ step (p, v, l, s) cgr = cgr
...
@@ -118,6 +118,7 @@ step (p, v, l, s) cgr = cgr
where
where
mNc
=
nodeCommunity
v
cgr
mNc
=
nodeCommunity
v
cgr
ncs
=
nodeNeighbours
v
cgr
ncs
=
nodeNeighbours
v
cgr
-- We move node from community nc into ncs
-- We move node from community nc into ncs
moves
::
Maybe
(
LNode
Community
,
[
LNode
Community
])
moves
::
Maybe
(
LNode
Community
,
[
LNode
Community
])
moves
=
case
mNc
of
moves
=
case
mNc
of
...
@@ -177,11 +178,12 @@ moveNodeWithNeighbours :: Adj FEdge -> Node -> Direction -> Community -> Communi
...
@@ -177,11 +178,12 @@ moveNodeWithNeighbours :: Adj FEdge -> Node -> Direction -> Community -> Communi
moveNodeWithNeighbours
lnNeighbors
n
direction
(
Community
(
ns
,
inwsum
,
totwsum
))
=
moveNodeWithNeighbours
lnNeighbors
n
direction
(
Community
(
ns
,
inwsum
,
totwsum
))
=
Community
(
newNs
,
newInWsum
,
newTotWsum
)
Community
(
newNs
,
newInWsum
,
newTotWsum
)
where
where
newNs
::
[
Node
]
newNs
=
case
direction
of
newNs
=
case
direction
of
Into
->
n
:
ns
Into
->
n
:
ns
OutOf
->
DL
.
delete
n
ns
OutOf
->
DL
.
delete
n
ns
newInWsum
,
newTotWsum
::
Double
newInWsum
=
inwsum
+
directionN
*
sumN
newInWsum
=
inwsum
+
directionN
*
sumN
newTotWsum
=
totwsum
+
directionN
*
(
sumN
-
sumNonCom
)
newTotWsum
=
totwsum
+
directionN
*
(
sumN
-
sumNonCom
)
...
...
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