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
165
Issues
165
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
86dabcfa
Verified
Commit
86dabcfa
authored
Jun 02, 2025
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 471-dev-node-multiterms
parents
a3f2c059
a2a7b447
Pipeline
#7635
passed with stages
in 58 minutes and 17 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
API.hs
src/Gargantext/Core/Viz/Graph/API.hs
+6
-4
Tools.hs
src/Gargantext/Core/Viz/Graph/Tools.hs
+0
-1
Types.hs
src/Gargantext/Core/Viz/Graph/Types.hs
+1
-0
No files found.
src/Gargantext/Core/Viz/Graph/API.hs
View file @
86dabcfa
...
@@ -77,7 +77,7 @@ getGraph nId = do
...
@@ -77,7 +77,7 @@ getGraph nId = do
let
defaultEdgesStrength
=
Strong
let
defaultEdgesStrength
=
Strong
let
defaultBridgenessMethod
=
BridgenessBasic
let
defaultBridgenessMethod
=
BridgenessBasic
graph'
<-
computeGraph
cId
defaultBridgenessMethod
(
withMetric
defaultMetric
)
defaultEdgesStrength
(
NgramsTerms
,
NgramsTerms
)
repo
graph'
<-
computeGraph
cId
defaultBridgenessMethod
(
withMetric
defaultMetric
)
defaultEdgesStrength
(
NgramsTerms
,
NgramsTerms
)
repo
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
defaultMetric
defaultEdgesStrength
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
defaultMetric
defaultEdgesStrength
defaultBridgenessMethod
let
mt'
=
set
gm_legend
(
generateLegend
graph'
)
mt
let
mt'
=
set
gm_legend
(
generateLegend
graph'
)
mt
let
let
graph''
=
set
graph_metadata
(
Just
mt'
)
graph'
graph''
=
set
graph_metadata
(
Just
mt'
)
graph'
...
@@ -138,7 +138,7 @@ recomputeGraph nId bridgeMethod maybeSimilarity maybeStrength nt1 nt2 force' = d
...
@@ -138,7 +138,7 @@ recomputeGraph nId bridgeMethod maybeSimilarity maybeStrength nt1 nt2 force' = d
case
graph
of
case
graph
of
Nothing
->
do
Nothing
->
do
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
(
fromMaybe
Order1
maybeSimilarity
)
strength
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
(
fromMaybe
Order1
maybeSimilarity
)
strength
bridgeMethod
g
<-
computeG
mt
g
<-
computeG
mt
pure
$
trace
(
"[G.V.G.API.recomputeGraph] Graph empty, computed"
::
Text
)
g
pure
$
trace
(
"[G.V.G.API.recomputeGraph] Graph empty, computed"
::
Text
)
g
Just
graph'
->
if
(
listVersion
==
Just
v
)
&&
(
not
force'
)
Just
graph'
->
if
(
listVersion
==
Just
v
)
&&
(
not
force'
)
...
@@ -146,7 +146,7 @@ recomputeGraph nId bridgeMethod maybeSimilarity maybeStrength nt1 nt2 force' = d
...
@@ -146,7 +146,7 @@ recomputeGraph nId bridgeMethod maybeSimilarity maybeStrength nt1 nt2 force' = d
else
do
else
do
case
graphMetadata
of
case
graphMetadata
of
Nothing
->
do
Nothing
->
do
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
(
fromMaybe
Order1
maybeSimilarity
)
strength
mt
<-
defaultGraphMetadata
cId
listId
"Title"
repo
(
fromMaybe
Order1
maybeSimilarity
)
strength
bridgeMethod
g
<-
computeG
mt
g
<-
computeG
mt
pure
$
trace
(
"[G.V.G.API] Graph exists, no metadata, recomputing"
::
Text
)
g
pure
$
trace
(
"[G.V.G.API] Graph exists, no metadata, recomputing"
::
Text
)
g
Just
mt
->
do
Just
mt
->
do
...
@@ -206,12 +206,14 @@ defaultGraphMetadata :: HasNodeError err
...
@@ -206,12 +206,14 @@ defaultGraphMetadata :: HasNodeError err
->
NodeListStory
->
NodeListStory
->
GraphMetric
->
GraphMetric
->
Strength
->
Strength
->
BridgenessMethod
->
DBCmd
err
GraphMetadata
->
DBCmd
err
GraphMetadata
defaultGraphMetadata
cId
lId
t
repo
gm
str
=
do
defaultGraphMetadata
cId
lId
t
repo
gm
str
bm
=
do
pure
$
GraphMetadata
{
_gm_title
=
t
pure
$
GraphMetadata
{
_gm_title
=
t
,
_gm_metric
=
gm
,
_gm_metric
=
gm
,
_gm_edgesStrength
=
Just
str
,
_gm_edgesStrength
=
Just
str
,
_gm_corpusId
=
[
cId
]
,
_gm_corpusId
=
[
cId
]
,
_gm_bridgenessMethod
=
Just
bm
,
_gm_legend
=
[
,
_gm_legend
=
[
LegendField
1
"#FFF"
"Cluster1"
LegendField
1
"#FFF"
"Cluster1"
,
LegendField
2
"#FFF"
"Cluster2"
,
LegendField
2
"#FFF"
"Cluster2"
...
...
src/Gargantext/Core/Viz/Graph/Tools.hs
View file @
86dabcfa
...
@@ -41,7 +41,6 @@ import IGraph qualified as Igraph
...
@@ -41,7 +41,6 @@ import IGraph qualified as Igraph
import
IGraph.Algorithms.Layout
qualified
as
Layout
import
IGraph.Algorithms.Layout
qualified
as
Layout
import
IGraph.Random
(
Gen
)
-- (Gen(..))
import
IGraph.Random
(
Gen
)
-- (Gen(..))
-------------------------------------------------------------
-------------------------------------------------------------
type
Threshold
=
Double
type
Threshold
=
Double
...
...
src/Gargantext/Core/Viz/Graph/Types.hs
View file @
86dabcfa
...
@@ -144,6 +144,7 @@ data GraphMetadata =
...
@@ -144,6 +144,7 @@ data GraphMetadata =
GraphMetadata
{
_gm_title
::
Text
-- title of the graph
GraphMetadata
{
_gm_title
::
Text
-- title of the graph
,
_gm_metric
::
GraphMetric
,
_gm_metric
::
GraphMetric
,
_gm_edgesStrength
::
Maybe
Strength
,
_gm_edgesStrength
::
Maybe
Strength
,
_gm_bridgenessMethod
::
Maybe
BridgenessMethod
,
_gm_corpusId
::
[
NodeId
]
-- we can map with different corpus
,
_gm_corpusId
::
[
NodeId
]
-- we can map with different corpus
,
_gm_legend
::
[
LegendField
]
-- legend of the Graph
,
_gm_legend
::
[
LegendField
]
-- legend of the Graph
,
_gm_list
::
ListForGraph
,
_gm_list
::
ListForGraph
...
...
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