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
6fa712b5
Commit
6fa712b5
authored
Jul 28, 2016
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX : nub
parent
89f88ad5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
Louvain.hs
src/Data/Louvain.hs
+1
-2
Utils.hs
src/Data/Utils.hs
+1
-2
No files found.
src/Data/Louvain.hs
View file @
6fa712b5
module
Data.Louvain
where
import
Data.Utils
import
Data.List
(
maximumBy
,
nub
)
import
Data.Graph.Inductive
...
...
@@ -11,7 +10,7 @@ inducedGraph :: (Eq b, Ord b, DynGraph gr) => gr a b -> (Node, [Node]) -> gr a b
inducedGraph
gr
(
a
,
b
)
=
delNodes
b
(
insEdges
newEdges
gr'
)
where
gr'
=
undir
gr
newEdges
=
Prelude
.
map
(
\
(
n
,
l
)
->
(
a
,
n
,
l
))
(
uniq
$
concat
$
Prelude
.
map
(
lsuc
gr'
)
b
)
newEdges
=
Prelude
.
map
(
\
(
n
,
l
)
->
(
a
,
n
,
l
))
(
nub
$
concat
$
Prelude
.
map
(
lsuc
gr'
)
b
)
-- | TODO exducedGraph (inverse for tests with quickCheck)
inducedGraph'
::
(
Ord
b
,
DynGraph
gr
)
=>
gr
a
b
->
[(
Node
,
[
Node
])]
->
gr
a
b
...
...
src/Data/Utils.hs
View file @
6fa712b5
module
Data.Utils
where
import
Data.Graph.Inductive
import
Data.Set
as
S
(
toList
,
fromList
)
import
qualified
Data.List
(
nub
)
import
Data.List
(
nub
)
label'
::
(
Graph
gr
)
=>
gr
a
b
->
Edge
->
Maybe
b
...
...
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