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
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
f73244c4
Commit
f73244c4
authored
Jul 06, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-refact-graph' into dev
parents
df8144ca
0ce69ad8
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
157 additions
and
44 deletions
+157
-44
build
bin/build
+1
-1
install
bin/install
+1
-1
Graph.hs
src/Gargantext/Viz/Graph.hs
+2
-2
API.hs
src/Gargantext/Viz/Graph/API.hs
+1
-1
Matrice.hs
src/Gargantext/Viz/Graph/Distances/Matrice.hs
+149
-38
Tools.hs
src/Gargantext/Viz/Graph/Tools.hs
+3
-1
No files found.
bin/build
View file @
f73244c4
#!/bin/bash
#!/bin/bash
stack build
--profile
# --test # --haddock
stack build
#
--profile # --test # --haddock
bin/install
View file @
f73244c4
#!/bin/bash
#!/bin/bash
stack
install
--profile
# --test --haddock
stack
install
#
--profile # --test --haddock
src/Gargantext/Viz/Graph.hs
View file @
f73244c4
...
@@ -116,8 +116,8 @@ instance ToSchema GraphMetadata where
...
@@ -116,8 +116,8 @@ instance ToSchema GraphMetadata where
makeLenses
''
G
raphMetadata
makeLenses
''
G
raphMetadata
data
Graph
=
Graph
{
_graph_nodes
::
[
Node
]
data
Graph
=
Graph
{
_graph_nodes
::
[
Node
]
,
_graph_edges
::
[
Edge
]
,
_graph_edges
::
[
Edge
]
,
_graph_metadata
::
Maybe
GraphMetadata
,
_graph_metadata
::
Maybe
GraphMetadata
}
}
deriving
(
Show
,
Generic
)
deriving
(
Show
,
Generic
)
...
...
src/Gargantext/Viz/Graph/API.hs
View file @
f73244c4
...
@@ -149,7 +149,7 @@ computeGraph cId d nt repo = do
...
@@ -149,7 +149,7 @@ computeGraph cId d nt repo = do
-- TODO split diagonal
-- TODO split diagonal
myCooc
<-
Map
.
filter
(
>
1
)
myCooc
<-
Map
.
filter
(
>
1
)
<$>
getCoocByNgrams
(
Diagonal
Fals
e
)
<$>
getCoocByNgrams
(
Diagonal
Tru
e
)
<$>
groupNodesByNgrams
ngs
<$>
groupNodesByNgrams
ngs
<$>
getNodesByNgramsOnlyUser
cId
(
lIds
<>
[
lId
])
nt
(
Map
.
keys
ngs
)
<$>
getNodesByNgramsOnlyUser
cId
(
lIds
<>
[
lId
])
nt
(
Map
.
keys
ngs
)
...
...
src/Gargantext/Viz/Graph/Distances/Matrice.hs
View file @
f73244c4
This diff is collapsed.
Click to expand it.
src/Gargantext/Viz/Graph/Tools.hs
View file @
f73244c4
...
@@ -60,7 +60,9 @@ cooc2graph distance threshold myCooc = do
...
@@ -60,7 +60,9 @@ cooc2graph distance threshold myCooc = do
let
let
(
ti
,
_
)
=
createIndices
myCooc
(
ti
,
_
)
=
createIndices
myCooc
myCooc'
=
toIndex
ti
myCooc
myCooc'
=
toIndex
ti
myCooc
matCooc
=
map2mat
0
(
Map
.
size
ti
)
$
Map
.
filter
(
>
1
)
myCooc'
matCooc
=
map2mat
0
(
Map
.
size
ti
)
$
Map
.
filterWithKey
(
\
(
a
,
b
)
_
->
a
/=
b
)
$
Map
.
filter
(
>
1
)
myCooc'
distanceMat
=
measure
distance
matCooc
distanceMat
=
measure
distance
matCooc
distanceMap
=
Map
.
filter
(
>
threshold
)
$
mat2map
distanceMat
distanceMap
=
Map
.
filter
(
>
threshold
)
$
mat2map
distanceMat
...
...
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