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
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
Christian Merten
haskell-gargantext
Commits
7845b1c9
Commit
7845b1c9
authored
Jan 12, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Advanced Bridgeness test
parent
60e38c9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
Bridgeness.hs
src/Gargantext/Core/Viz/Graph/Bridgeness.hs
+6
-3
No files found.
src/Gargantext/Core/Viz/Graph/Bridgeness.hs
View file @
7845b1c9
...
@@ -61,12 +61,15 @@ type Confluence = Map (NodeId, NodeId) Double
...
@@ -61,12 +61,15 @@ type Confluence = Map (NodeId, NodeId) Double
bridgeness
::
Bridgeness
bridgeness
::
Bridgeness
->
Map
(
NodeId
,
NodeId
)
Double
->
Map
(
NodeId
,
NodeId
)
Double
->
Map
(
NodeId
,
NodeId
)
Double
->
Map
(
NodeId
,
NodeId
)
Double
bridgeness
(
Bridgeness_Advanced
_sim
c
)
m
=
Map
.
fromList
bridgeness
(
Bridgeness_Advanced
sim
c
)
m
=
Map
.
fromList
$
List
.
filter
(
\
x
->
if
sim
==
Conditional
then
snd
x
>
0.2
else
snd
x
>
0.02
)
$
map
(
\
(
ks
,
(
v1
,
_v2
))
->
(
ks
,
v1
))
$
map
(
\
(
ks
,
(
v1
,
_v2
))
->
(
ks
,
v1
))
-- $ List.take (if sim == Conditional then 2*n else 3*n)
-- $ List.take (if sim == Conditional then 2*n else 3*n)
$
List
.
sortOn
(
Down
.
(
snd
.
snd
))
--
$ List.sortOn (Down . (snd . snd))
$
Map
.
toList
$
Map
.
toList
$
trace
(
"bridgeness3 m c"
<>
show
(
m
,
c
))
$
Map
.
intersectionWithKey
(
\
k
v1
v2
->
trace
(
"intersectionWithKey "
<>
(
show
(
k
,
v1
,
v2
)))
(
v1
,
v2
))
m
c
$
trace
(
"bridgeness3 m c"
<>
show
(
m
,
c
))
$
Map
.
intersectionWithKey
(
\
k
v1
v2
->
trace
(
"intersectionWithKey "
<>
(
show
(
k
,
v1
,
v2
)))
(
v1
,
v2
))
m
c
{-
{-
where
where
...
...
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