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
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
10
Merge Requests
10
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
a8e53a57
Commit
a8e53a57
authored
5 years ago
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] Proxemy rewrite.
parent
24a0af39
No related merge requests found
Pipeline
#423
failed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
Proxemy.hs
src/Gargantext/Viz/Graph/Proxemy.hs
+11
-9
No files found.
src/Gargantext/Viz/Graph/Proxemy.hs
View file @
a8e53a57
...
...
@@ -48,25 +48,27 @@ similarity_CONF_x_y g (x,y) l r we = similarity
xline
::
Map
Node
Double
xline
=
prox_markov
g
[
x
]
l
r
filterNeighbors'
where
filterNeighbors'
=
if
we
then
filterNeighbors
filterNeighbors'
=
if
not
we
then
filterNeighbors
else
rm_edge_neighbors
y
-- (\g n -> List.filter (/= y) $ filterNeighbors g n)
pair_is_edge
::
Bool
pair_is_edge
=
if
we
then
False
else
List
.
elem
y
(
filterNeighbors
g
x
)
lim_SC
::
Double
lim_SC
|
count
==
0
=
0
|
denominator
==
0
=
0
|
otherwise
=
if
pair_is_edge
then
(
degree
g
y
+
1
-
1
)
/
count
else
(
degree
g
y
+
1
)
/
count
then
(
degree
g
y
+
1
-
1
)
/
denominator
else
(
degree
g
y
+
1
)
/
denominator
where
count
=
if
pair_is_edge
denominator
=
if
pair_is_edge
then
(
2
*
(
ecount
g
)
+
(
vcount
g
)
-
2
)
else
(
2
*
(
ecount
g
)
+
(
vcount
g
))
else
(
2
*
(
ecount
g
)
+
(
vcount
g
)
)
rm_edge_neighbors
::
Node
->
Graph_Undirected
->
Node
->
[
Node
]
rm_edge_neighbors
b
g
a
=
List
.
filter
(
\
x
->
(
x
/=
a
)
||
(
x
/=
b
))
$
filterNeighbors
g
a
rm_edge_neighbors
b
g
a
=
List
.
filter
(
/=
b
)
$
filterNeighbors
g
a
-- | TODO do as a Map instead of [Node] ?
prox_markov
::
Graph_Undirected
->
[
Node
]
->
Length
->
FalseReflexive
->
NeighborsFilter
->
Map
Node
Double
...
...
This diff is collapsed.
Click to expand it.
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