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
3ad22b68
Commit
3ad22b68
authored
Oct 04, 2014
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugs-fixed in localview
parent
e8c8c22d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
290 additions
and
184 deletions
+290
-184
enviroment.js
tinawebJS/js/enviroment.js
+61
-22
main.js
tinawebJS/js/main.js
+3
-1
methods.js
tinawebJS/js/methods.js
+226
-161
No files found.
tinawebJS/js/enviroment.js
View file @
3ad22b68
...
...
@@ -158,10 +158,12 @@ function justhide(){
// EdgeWeightFilter("#sliderBEdgeWeight", "label" , "nodes2", "weight");
function
EdgeWeightFilter
(
sliderDivID
,
type_attrb
,
type
,
criteria
)
{
if
(
$
(
sliderDivID
).
html
()
!=
""
)
{
pr
(
"
\
t
\
t
\
t
\
t
\
t
\
t[[ algorithm not applied "
+
sliderDivID
+
" ]]"
)
return
;
}
// if ($(sliderDivID).html()!="") {
// pr("\t\t\t\t\t\t[[ algorithm not applied "+sliderDivID+" ]]")
// return;
// }
// sliderDivID = "#sliderAEdgeWeight"
// type = "nodes1"
// type_attrb = "label"
...
...
@@ -176,7 +178,22 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
// AlgorithmForSliders ( partialGraph._core.graph.edges , "label" , "nodes2" , "weight")
// AlgorithmForSliders ( partialGraph._core.graph.nodes , "type" , "Document" , "size")
// AlgorithmForSliders ( partialGraph._core.graph.nodes , "type" , "NGram" , "size")
if
(
partialGraph
.
_core
.
graph
.
edges
.
length
==
0
)
return
;
if
(
partialGraph
.
_core
.
graph
.
edges
.
length
==
0
)
{
pr
(
"je suis ici et essai ca"
)
$
(
sliderDivID
).
freshslider
({
range
:
true
,
step
:
1
,
value
:[
10
,
60
],
enabled
:
false
,
onchange
:
function
(
low
,
high
){
console
.
log
(
low
,
high
);
}
});
return
;
}
var
filterparams
=
AlgorithmForSliders
(
partialGraph
.
_core
.
graph
.
edges
,
type_attrb
,
type
,
criteria
)
var
steps
=
filterparams
[
"steps"
]
...
...
@@ -241,10 +258,12 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
// NodeWeightFilter ( "#sliderBNodeWeight" , "NGram" , "type" , "size")
function
NodeWeightFilter
(
sliderDivID
,
type_attrb
,
type
,
criteria
)
{
if
(
$
(
sliderDivID
).
html
()
!=
""
)
{
pr
(
"
\
t
\
t
\
t
\
t
\
t
\
t[[ algorithm not applied "
+
sliderDivID
+
" ]]"
)
return
;
}
// if ($(sliderDivID).html()!="") {
// pr("\t\t\t\t\t\t[[ algorithm not applied "+sliderDivID+" ]]")
// return;
// }
// sliderDivID = "#sliderAEdgeWeight"
// type = "nodes1"
// type_attrb = "label"
...
...
@@ -259,8 +278,23 @@ function NodeWeightFilter(sliderDivID , type_attrb , type , criteria) {
// AlgorithmForSliders ( partialGraph._core.graph.edges , "label" , "nodes2" , "weight")
// AlgorithmForSliders ( partialGraph._core.graph.nodes , "type" , "Document" , "size")
// AlgorithmForSliders ( partialGraph._core.graph.nodes , "type" , "NGram" , "size")
if
(
partialGraph
.
_core
.
graph
.
nodes
.
length
==
0
)
return
;
if
(
partialGraph
.
_core
.
graph
.
nodes
.
length
==
0
)
{
$
(
sliderDivID
).
freshslider
({
range
:
true
,
step
:
1
,
value
:[
10
,
60
],
enabled
:
false
,
onchange
:
function
(
low
,
high
){
console
.
log
(
low
,
high
);
}
});
return
;
}
var
filterparams
=
AlgorithmForSliders
(
partialGraph
.
_core
.
graph
.
nodes
,
type_attrb
,
type
,
criteria
)
var
steps
=
filterparams
[
"steps"
]
var
finalarray
=
filterparams
[
"finalarray"
]
...
...
@@ -357,17 +391,22 @@ function AlgorithmForSliders( elements , type_attrb , type , criteria) {
// // pr(e[criteria])
// }
var
N
=
result
.
length
var
magnitude
=
(
""
+
N
).
length
//order of magnitude of edges|nodes
var
exponent
=
magnitude
-
1
var
steps
=
Math
.
pow
(
10
,
exponent
)
// #(10 ^ magnit-1) steps
var
stepsize
=
Math
.
round
(
N
/
steps
)
// ~~(visibledges / #steps)
// pr("-----------------------------------")
// pr("number of visible nodes|edges: "+N);
// pr("magnitude : "+magnitude)
// pr("number of steps : "+steps)
// pr("size of one step : "+stepsize)
// pr("-----------------------------------")
// var magnitude = (""+N).length //order of magnitude of edges|nodes
// var exponent = magnitude - 1
// var steps = Math.pow(10,exponent) // #(10 ^ magnit-1) steps
// var stepsize = Math.round(N/steps)// ~~(visibledges / #steps)
//var roundsqrtN = Math.round( Math.sqrt( N ) );
var
steps
=
Math
.
round
(
Math
.
sqrt
(
N
)
);
var
stepsize
=
Math
.
round
(
N
/
steps
);
pr
(
"-----------------------------------"
)
pr
(
"number of visible nodes|edges: "
+
N
);
pr
(
"number of steps : "
+
steps
)
pr
(
"size of one step : "
+
stepsize
)
pr
(
"-----------------------------------"
)
var
finalarray
=
[]
...
...
tinawebJS/js/main.js
View file @
3ad22b68
...
...
@@ -713,7 +713,9 @@ function SigmaLayouting( URL, DATA, NAME) {
$
(
"#semLoader"
).
hide
();
if
(
NOW
==
"B"
)
{
changeToMacro
(
"semantic"
);
partialGraph
.
draw
();
partialGraph
.
draw
();
$
(
"#sliderBEdgeWeight"
).
html
(
""
);
$
(
"#sliderBNodeWeight"
).
html
(
""
);
EdgeWeightFilter
(
"#sliderBEdgeWeight"
,
"label"
,
"nodes2"
,
"weight"
);
NodeWeightFilter
(
"#sliderBNodeWeight"
,
"type"
,
"NGram"
,
"size"
)
$
(
"#colorGraph"
).
hide
();
...
...
tinawebJS/js/methods.js
View file @
3ad22b68
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