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
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
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
1582bc70
Commit
1582bc70
authored
Jun 27, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-phylo' into dev-merge
parents
c558d10e
8ab26486
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
Phylo.hs
src/Gargantext/Core/Viz/Phylo.hs
+1
-1
SynchronicClustering.hs
src/Gargantext/Core/Viz/Phylo/SynchronicClustering.hs
+8
-2
No files found.
src/Gargantext/Core/Viz/Phylo.hs
View file @
1582bc70
...
...
@@ -509,7 +509,7 @@ data PhyloGroup =
,
_phylo_groupPeriodMemoryParents
::
[
Pointer'
]
,
_phylo_groupPeriodMemoryChilds
::
[
Pointer'
]
}
deriving
(
Generic
,
Show
,
Eq
,
NFData
)
deriving
(
Generic
,
Show
,
Eq
,
NFData
,
Ord
)
instance
ToSchema
PhyloGroup
where
declareNamedSchema
=
genericDeclareNamedSchema
(
unPrefixSwagger
"_phylo_"
)
...
...
src/Gargantext/Core/Viz/Phylo/SynchronicClustering.hs
View file @
1582bc70
...
...
@@ -168,13 +168,19 @@ reduceGroups prox sync docs diagos branch =
$
mapWithKey
(
\
prd
groups
->
-- 2) for each period, transform the groups as a proximity graph filtered by a threshold
let
diago
=
reduceDiagos
$
filterDiago
diagos
[
prd
]
edges
=
groupsToEdges
prox
sync
((
sum
.
elems
)
$
restrictKeys
docs
$
periodsToYears
[
prd
])
diago
groups
edgesLeft
=
fromList
$
groupsToEdges
prox
sync
((
sum
.
elems
)
$
restrictKeys
docs
$
periodsToYears
[
prd
])
diago
groups
edgesRight
=
fromList
$
map
(
\
((
k1
,
k2
),
v
)
->
((
k2
,
k1
),
v
))
$
groupsToEdges
prox
sync
((
sum
.
elems
)
$
restrictKeys
docs
$
periodsToYears
[
prd
])
diago
(
reverse
groups
)
mergedEdges
=
Map
.
toList
$
unionWith
(
\
v1
v2
->
if
v1
>=
v2
then
v1
else
v2
)
edgesLeft
edgesRight
in
map
(
\
comp
->
-- 4) add to each groups their futur level parent group
let
parentId
=
toParentId
(
head'
"parentId"
comp
)
in
map
(
\
g
->
g
&
phylo_groupScaleParents
%~
(
++
[(
parentId
,
1
)])
)
comp
)
-- 3) reduce the graph a a set of related components
$
toRelatedComponents
groups
e
dges
)
periods
$
toRelatedComponents
groups
mergedE
dges
)
periods
chooseClusteringStrategy
::
Synchrony
->
[[
PhyloGroup
]]
->
[[
PhyloGroup
]]
...
...
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