Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
145
Issues
145
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
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
haskell-gargantext
Commits
db5b08df
Commit
db5b08df
authored
Oct 28, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[COSMETICS] max cliques, cut function lines.
parent
10564410
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
MaxClique.hs
src/Gargantext/Viz/Graph/MaxClique.hs
+7
-3
No files found.
src/Gargantext/Viz/Graph/MaxClique.hs
View file @
db5b08df
...
...
@@ -49,7 +49,8 @@ def fast_maximal_cliques(g):
{-# LANGUAGE NoImplicitPrelude #-}
module
Gargantext.Viz.Graph.MaxClique
where
module
Gargantext.Viz.Graph.MaxClique
where
import
Gargantext.Prelude
import
Data.List
(
sortOn
,
nub
,
concat
,
length
)
...
...
@@ -59,7 +60,6 @@ import Data.Graph.Inductive hiding (Graph, neighbors, subgraph, (&))
import
Gargantext.Viz.Graph.FGL
(
Graph_Undirected
,
degree
,
neighbors
,
mkGraphUfromEdges
)
type
Graph
=
Graph_Undirected
type
Neighbor
=
Node
...
...
@@ -90,7 +90,11 @@ maxCliques g = map (\n -> subMaxCliques g (n:ns)) ns & concat & takeMax
takeMax
::
[[
Node
]]
->
[[
Node
]]
takeMax
=
map
toList
.
purge
.
map
fromList
.
sortOn
length
.
nub
takeMax
=
map
toList
.
purge
.
map
fromList
.
sortOn
length
.
nub
where
purge
::
[
Set
Node
]
->
[
Set
Node
]
purge
[]
=
[]
...
...
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