Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
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
david Chavalarias
clinicaltrials
Commits
a58b9922
Commit
a58b9922
authored
Nov 03, 2014
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
json reduction
parent
95b7592b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
14 deletions
+20
-14
sigma.parseCustom.js
tinawebJS/js/sigma.parseCustom.js
+20
-14
No files found.
tinawebJS/js/sigma.parseCustom.js
View file @
a58b9922
...
@@ -517,8 +517,8 @@ function fullExtract(){
...
@@ -517,8 +517,8 @@ function fullExtract(){
Edges
[
indice
]
=
edge
;
Edges
[
indice
]
=
edge
;
if
(
idS
==
idT
)
//
if(idS==idT)
pr
(
edge
.
sourceID
+
"|"
+
idS
+
" <-> "
+
idT
+
"|"
+
edge
.
targetID
)
//
pr(edge.sourceID+"|"+idS+" <-> "+idT+"|"+edge.targetID)
if
(
idS
==
catSoc
&&
idT
==
catSoc
){
if
(
idS
==
catSoc
&&
idT
==
catSoc
){
// pr("anything here?")
// pr("anything here?")
...
@@ -682,16 +682,12 @@ function extractFromJson(data,seed){
...
@@ -682,16 +682,12 @@ function extractFromJson(data,seed){
Nodes
[
i
].
size
=
""
+
normalizedSize
;
Nodes
[
i
].
size
=
""
+
normalizedSize
;
nodeK
=
Nodes
[
i
];
nodeK
=
Nodes
[
i
];
otherGraph
.
addNode
(
i
,
nodeK
);
otherGraph
.
addNode
(
i
,
nodeK
);
// nodeK.hidden=true;/**///should be uncommented
// partialGraph.addNode(i,nodeK);
}
}
else
{
else
{
partialGraph
.
addNode
(
i
,
Nodes
[
i
]);
partialGraph
.
addNode
(
i
,
Nodes
[
i
]);
updateSearchLabels
(
i
,
Nodes
[
i
].
label
,
Nodes
[
i
].
type
);
updateSearchLabels
(
i
,
Nodes
[
i
].
label
,
Nodes
[
i
].
type
);
// unHide(i);
}
}
// pr(Nodes[i])
}
}
var
edgeId
=
0
;
var
edgeId
=
0
;
...
@@ -706,14 +702,21 @@ function extractFromJson(data,seed){
...
@@ -706,14 +702,21 @@ function extractFromJson(data,seed){
sourceID
:
source
,
sourceID
:
source
,
targetID
:
target
,
targetID
:
target
,
lock
:
false
,
lock
:
false
,
label
:
edgesNodes
[
i
].
type
,
label
:
""
,
weight
:
edgesNodes
[
i
].
w
weight
:
edgesNodes
[
i
].
w
};
};
if
(
edge
.
weight
<
minEdgeWeight
)
minEdgeWeight
=
edge
.
weight
;
if
(
edge
.
weight
<
minEdgeWeight
)
minEdgeWeight
=
edge
.
weight
;
if
(
edge
.
weight
>
maxEdgeWeight
)
maxEdgeWeight
=
edge
.
weight
;
if
(
edge
.
weight
>
maxEdgeWeight
)
maxEdgeWeight
=
edge
.
weight
;
Edges
[
indice
]
=
edge
;
Edges
[
indice
]
=
edge
;
if
(
edge
.
label
==
"nodes1"
){
idS
=
Nodes
[
edge
.
sourceID
].
type
;
idT
=
Nodes
[
edge
.
targetID
].
type
;
if
(
idS
==
catSoc
&&
idT
==
catSoc
){
edge
.
label
=
"nodes1"
;
if
(
isUndef
(
nodes1
[
source
]))
{
if
(
isUndef
(
nodes1
[
source
]))
{
nodes1
[
source
]
=
{
nodes1
[
source
]
=
{
...
@@ -738,7 +741,8 @@ function extractFromJson(data,seed){
...
@@ -738,7 +741,8 @@ function extractFromJson(data,seed){
}
}
if
(
edge
.
label
==
"nodes2"
){
if
(
idS
==
catSem
&&
idT
==
catSem
){
edge
.
label
=
"nodes2"
;
if
(
isUndef
(
nodes2
[
source
]))
{
if
(
isUndef
(
nodes2
[
source
]))
{
nodes2
[
source
]
=
{
nodes2
[
source
]
=
{
...
@@ -754,14 +758,16 @@ function extractFromJson(data,seed){
...
@@ -754,14 +758,16 @@ function extractFromJson(data,seed){
}
}
nodes2
[
source
].
neighbours
.
push
(
target
);
nodes2
[
source
].
neighbours
.
push
(
target
);
nodes2
[
target
].
neighbours
.
push
(
source
);
nodes2
[
target
].
neighbours
.
push
(
source
);
otherGraph
.
addEdge
(
indice
,
source
,
target
,
edge
);
otherGraph
.
addEdge
(
indice
,
source
,
target
,
edge
);
}
}
if
(
edge
.
label
==
"bipartite"
){
if
((
idS
==
catSoc
&&
idT
==
catSem
)
||
(
idS
==
catSem
&&
idT
==
catSoc
))
{
edge
.
label
=
"bipartite"
;
s
=
edge
.
sourceID
s
=
edge
.
sourceID
// // Source is Document
// // Source is Document
if
(
Nodes
[
s
].
type
==
catSoc
)
{
if
(
Nodes
[
s
].
type
==
catSoc
)
{
...
...
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