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
88affaf5
Commit
88affaf5
authored
Jun 15, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove last deprecated bits with the old dicts by cat
parent
fb15dba9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
26 deletions
+6
-26
main.js
tinawebJS/main.js
+0
-8
sigma.parseCustom.js
tinawebJS/sigma.parseCustom.js
+6
-18
No files found.
tinawebJS/main.js
View file @
88affaf5
...
...
@@ -32,14 +32,6 @@ TW.states = [TW.initialSystemState]
// SystemState() returns the current situation
TW
.
SystemState
=
function
()
{
return
TW
.
states
.
slice
(
-
1
)[
0
]
}
// -------------------------------8<--------------
// £TODO remove deprecated here and in parseCustom or change to an index by type
var
nodes1
=
{};
var
nodes2
=
{};
var
bipartiteD2N
=
{};
var
bipartiteN2D
=
{};
// -------------------------------8<--------------
// ======== [ what to do at start ] ========= //
console
.
log
(
"Starting TWJS"
)
...
...
tinawebJS/sigma.parseCustom.js
View file @
88affaf5
...
...
@@ -23,7 +23,7 @@ var ParseCustom = function ( format , data ) {
// input = [ "cat1" , "cat2" , ...]
this
.
parseGEXF
=
function
(
categories
)
{
return
dictfyGexf
(
this
.
data
,
categories
);
}
// output =
[ nodes, edges, nodes1, ... ]
}
// output =
{ nodes, edges }
...
...
@@ -36,7 +36,7 @@ var ParseCustom = function ( format , data ) {
// input = [ "cat1" , "cat2" , ...]
this
.
parseJSON
=
function
(
categories
)
{
return
dictfyJSON
(
this
.
data
,
categories
);
}
// output =
[ nodes, edges, nodes1, ... ]
}
// output =
{ nodes, edges }
};
...
...
@@ -603,10 +603,7 @@ function dictfyGexf( gexf , categories ){
var
catCount
=
{}
for
(
var
i
in
categories
)
catDict
[
categories
[
i
]]
=
i
;
var
edges
=
{},
nodes
=
{},
nodes1
=
{},
nodes2
=
false
,
bipartiteD2N
=
false
,
bipartiteN2D
=
false
;
if
(
categories
.
length
>
1
)
{
nodes2
=
{},
bipartiteD2N
=
{},
bipartiteN2D
=
{}
}
var
edges
=
{},
nodes
=
{}
var
declaredAtts
=
gexfCheckAttributesMap
(
gexf
)
var
nodesAttributes
=
declaredAtts
.
nodeAttrs
...
...
@@ -885,10 +882,6 @@ function dictfyGexf( gexf , categories ){
resDict
.
catCount
=
catCount
;
// ex: {'ISIterms':1877} ie #nodes
resDict
.
nodes
=
nodes
;
// { nid1: {label:"...", size:"11.1", attributes:"...", color:"#aaa", etc}, nid2: ...}
resDict
.
edges
=
edges
;
resDict
.
n1
=
nodes1
;
// relations
if
(
nodes2
)
resDict
.
n2
=
nodes2
;
if
(
bipartiteD2N
)
resDict
.
D2N
=
bipartiteD2N
;
if
(
bipartiteN2D
)
resDict
.
N2D
=
bipartiteN2D
;
return
resDict
;
}
...
...
@@ -1008,11 +1001,10 @@ function dictfyJSON( data , categories ) {
var
catCount
=
{}
for
(
var
i
in
categories
)
catDict
[
categories
[
i
]]
=
i
;
var
edges
=
{},
nodes
=
{}
,
nodes1
=
{},
nodes2
=
false
,
bipartiteD2N
=
false
,
bipartiteN2D
=
false
;
var
edges
=
{},
nodes
=
{}
if
(
categories
.
length
>
1
)
{
nodes2
=
{},
bipartiteD2N
=
{},
bipartiteN2D
=
{}
}
// NB old additional objects by type nodes1 and nodes2 not necessary
// (can use TW.partialGraph.graph.nodesBySize faster custom index)
// normalization, same as parseGexf
let
minNodeSize
=
Infinity
...
...
@@ -1133,10 +1125,6 @@ function dictfyJSON( data , categories ) {
resDict
.
catCount
=
catCount
;
resDict
.
nodes
=
nodes
;
resDict
.
edges
=
edges
;
resDict
.
n1
=
nodes1
;
if
(
nodes2
)
resDict
.
n2
=
nodes2
;
if
(
bipartiteD2N
)
resDict
.
D2N
=
bipartiteD2N
;
if
(
bipartiteN2D
)
resDict
.
N2D
=
bipartiteN2D
;
return
resDict
;
}
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