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
147
Issues
147
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
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
90f7241e
Commit
90f7241e
authored
Jan 24, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bridgeness] fix.
parent
8e00be36
Pipeline
#143
failed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
Bridgeness.hs
src/Gargantext/Viz/Graph/Bridgeness.hs
+3
-4
No files found.
src/Gargantext/Viz/Graph/Bridgeness.hs
View file @
90f7241e
...
...
@@ -35,7 +35,7 @@ ordEdgesBetween :: (Ord distance, Ord node)
=>
[
node
]
->
[
node
]
->
Map
(
node
,
node
)
distance
->
[((
node
,
node
),
distance
)]
ordEdgesBetween
c1
c2
d
=
reverse
$
sortOn
snd
$
catMaybes
ordEdgesBetween
c1
c2
d
=
sortOn
snd
$
catMaybes
[
(,)
<$>
Just
(
n1
,
n2
)
<*>
lookup
(
n1
,
n2
)
d
|
n1
<-
c1
...
...
@@ -49,11 +49,10 @@ filterEdgesBetween :: (RealFrac b, Ord node, Ord distance) =>
->
[((
node
,
node
),
distance
)]
filterEdgesBetween
b
c1
c2
d
=
take
n
d'
where
n
=
round
$
b
*
i
/
(
s1
+
s
2
)
n
=
round
$
b
*
i
/
(
len
c1
+
len
c
2
)
d'
=
ordEdgesBetween
c1
c2
d
i
=
fromIntegral
$
length
d'
s1
=
fromIntegral
$
length
(
ordEdgesBetween
c1
c2
d
)
s2
=
fromIntegral
$
length
(
ordEdgesBetween
c2
c2
d
)
len
c
=
fromIntegral
$
length
(
ordEdgesBetween
c
c
d
)
bridgeness
::
Bridgeness
...
...
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