Commit 0d9cc033 authored by PkSM3's avatar PkSM3

egoquery and multiplequery unified

parent 2a82051f
This diff is collapsed.
......@@ -162,8 +162,6 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
pr("\t\t\t\t\t\t[[ algorithm not applied "+sliderDivID+" ]]")
return;
}
pr("heeere in edge weight filter")
// sliderDivID = "#sliderAEdgeWeight"
// type = "nodes1"
// type_attrb = "label"
......@@ -178,13 +176,11 @@ 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")
pr(partialGraph._core.graph.edges)
var filterparams = AlgorithmForSliders ( partialGraph._core.graph.edges , type_attrb , type , criteria)
pr("after algorithm for sliders")
var steps = filterparams["steps"]
var finalarray = filterparams["finalarray"]
pr(finalarray)
//finished
$(sliderDivID).freshslider({
range: true,
......@@ -320,13 +316,10 @@ function NodeWeightFilter(sliderDivID , type_attrb , type , criteria) {
function AlgorithmForSliders( elements , type_attrb , type , criteria) {
// // ( 1 )
// // get visible sigma nodes|edges
pr(elements)
elems=elements.filter(function(e) {
return e[type_attrb]==type;
});
pr("nodes|edges length: "+elems.length)
pr(elems)
// // ( 2 )
// // extract [ "edgeID" : edgeWEIGHT ] | [ "nodeID" : nodeSIZE ]
// // and save this into edges_weight | nodes_size
......
This diff is collapsed.
......@@ -239,7 +239,7 @@ function RefreshState(newNOW){
}
//this should be available!!
// EdgeWeightFilter("#sliderAEdgeWeight", "label" , "nodes1", "weight");
EdgeWeightFilter("#sliderAEdgeWeight", "label" , "nodes1", "weight");
$("#semLoader").hide();
$("#colorGraph").show();
......@@ -264,12 +264,15 @@ function RefreshState(newNOW){
if ( semanticConverged ) $("#semLoader").hide();
else $("#semLoader").show();
//this should be available!!
// EdgeWeightFilter("#sliderBEdgeWeight", "label" , "nodes2", "weight");
// NodeWeightFilter ( "#sliderBNodeWeight" , "type" , "NGram" , "size")
EdgeWeightFilter("#sliderBEdgeWeight", "label" , "nodes2", "weight");
NodeWeightFilter ( "#sliderBNodeWeight" , "type" , "NGram" , "size")
$("#colorGraph").hide();
}
if(NOW=="AaBb"){
LevelButtonDisable(true);
EdgeWeightFilter("#sliderAEdgeWeight", "label" , "nodes1", "weight");
EdgeWeightFilter("#sliderBEdgeWeight", "label" , "nodes2", "weight");
NodeWeightFilter ( "#sliderBNodeWeight" , "type" , "NGram" , "size")
$("#colorGraph").hide();
}
......@@ -1189,9 +1192,6 @@ function graphResetColor(){
function createEdgesForExistingNodes (typeOfNodes) {
pr("create Edges for existing Nodes")
pr(partialGraph._core.graph.nodes)
if(typeOfNodes=="social") typeOfNodes="Scholars"
if(typeOfNodes=="semantic") typeOfNodes="Keywords"
if(typeOfNodes=="sociosemantic") typeOfNodes="Bipartite"
......@@ -1298,8 +1298,6 @@ function createEdgesForExistingNodes (typeOfNodes) {
}
}
}
pr("AT THE END OF createEdgesForExistingNodes")
pr(partialGraph._core.graph.edges)
}
function hideEverything(){
......
......@@ -38,8 +38,8 @@ sigma.forceatlas2.ForceAtlas2 = function(graph , V , E) {
// Runtime (the ForceAtlas2 itself)
this.init = function() {
console.log("#Nodes: "+V)
console.log("#Edges: "+E)
// console.log("#Nodes: "+V)
// console.log("#Edges: "+E)
self.state = {step: 0, index: 0};
......@@ -886,9 +886,11 @@ sigma.forceatlas2.Region.prototype.updateMassAndGeometry = function() {
var massSumX = 0;
var massSumY = 0;
this.nodes.forEach(function(n) {
mass += n.fa2.mass;
massSumX += n.x * n.fa2.mass;
massSumY += n.y * n.fa2.mass;
if(n.fa2) {
mass += n.fa2.mass;
massSumX += n.x * n.fa2.mass;
massSumY += n.y * n.fa2.mass;
}
});
var massCenterX = massSumX / mass;
massCenterY = massSumY / mass;
......@@ -1082,7 +1084,7 @@ sigma.publicPrototype.stopForceAtlas2 = function() {
var ybuffer = miny;
for (var i in this._core.graph.nodesIndex) {
if (swMacro) {
if (swMacro && this._core.graph.nodesIndex[i].degree>0) {
Nodes[i].x = this._core.graph.nodesIndex[i].x;
Nodes[i].y = this._core.graph.nodesIndex[i].y;
}
......@@ -1106,11 +1108,11 @@ sigma.publicPrototype.stopForceAtlas2 = function() {
}
// -- / UPDATING THE DEGREE --
pr("minx: "+minx)
pr("maxx: "+maxx)
pr("miny: "+miny)
pr("maxy: "+maxy)
pr("")
// pr("minx: "+minx)
// pr("maxx: "+maxx)
// pr("miny: "+miny)
// pr("maxy: "+maxy)
// pr("")
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment