Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
Przemyslaw Kaminski
haskell-gargantext
Commits
b04c334f
Commit
b04c334f
authored
Apr 05, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] getNeighbours False instead of True (commit
4cbd0eb4
) TODO check behavior.
parent
a4a4a2fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
Prelude.hs
src/Gargantext/Prelude.hs
+2
-0
Clustering.hs
src/Gargantext/Viz/Phylo/Metrics/Clustering.hs
+3
-3
No files found.
src/Gargantext/Prelude.hs
View file @
b04c334f
...
...
@@ -37,6 +37,7 @@ import GHC.Err.Located (undefined)
import
GHC.Real
(
round
)
import
Control.Monad.IO.Class
(
MonadIO
)
import
Data.Maybe
(
isJust
,
fromJust
,
maybe
)
import
Data.Text
(
Text
)
import
Protolude
(
Bool
(
True
,
False
),
Int
,
Int64
,
Double
,
Integer
,
Fractional
,
Num
,
Maybe
(
Just
,
Nothing
)
,
Enum
,
Bounded
,
Float
...
...
@@ -269,4 +270,5 @@ maximumWith f = L.maximumBy (compare `on` f)
listToCombi
::
forall
a
b
.
(
a
->
b
)
->
[
a
]
->
[(
b
,
b
)]
listToCombi
f
l
=
[
(
f
x
,
f
y
)
|
(
x
:
rest
)
<-
L
.
tails
l
,
y
<-
rest
]
head'
::
Text
->
[
a
]
->
a
head'
e
xs
=
maybe
(
panic
e
)
identity
(
head
xs
)
src/Gargantext/Viz/Phylo/Metrics/Clustering.hs
View file @
b04c334f
...
...
@@ -32,8 +32,8 @@ import Gargantext.Viz.Phylo.Tools
relatedComp
::
Int
->
PhyloGroup
->
GroupGraph
->
[
PhyloGroup
]
->
[[
PhyloGroup
]]
->
[[
PhyloGroup
]]
relatedComp
idx
curr
(
nodes
,
edges
)
next
memo
|
null
nodes'
&&
null
next'
=
memo'
|
(
not
.
null
)
next'
=
relatedComp
idx
(
head'
"relatedComp1"
next'
)
(
nodes'
,
edges
)
(
tail
next'
)
memo'
|
otherwise
=
relatedComp
(
idx
+
1
)
(
head'
"relatedComp2"
nodes'
)
(
tail
nodes'
,
edges
)
[]
memo'
|
(
not
.
null
)
next'
=
relatedComp
idx
(
head'
"relatedComp1"
next'
)
(
nodes'
,
edges
)
(
tail
next'
)
memo'
|
otherwise
=
relatedComp
(
idx
+
1
)
(
head'
"relatedComp2"
nodes'
)
(
tail
nodes'
,
edges
)
[]
memo'
where
--------------------------------------
memo'
::
[[
PhyloGroup
]]
...
...
@@ -43,7 +43,7 @@ relatedComp idx curr (nodes,edges) next memo
|
otherwise
=
memo
++
[[
curr
]]
--------------------------------------
next'
::
[
PhyloGroup
]
next'
=
filter
(
\
x
->
not
$
elem
x
$
concat
memo
)
$
nub
$
next
++
(
getNeighbours
Fals
e
curr
edges
)
next'
=
filter
(
\
x
->
not
$
elem
x
$
concat
memo
)
$
nub
$
next
++
(
getNeighbours
Tru
e
curr
edges
)
--------------------------------------
nodes'
::
[
PhyloGroup
]
nodes'
=
filter
(
\
x
->
not
$
elem
x
next'
)
nodes
...
...
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