diff --git a/sample/algorithms.hpp b/sample/algorithms.hpp index ae7384d..47c18ca 100644 --- a/sample/algorithms.hpp +++ b/sample/algorithms.hpp @@ -223,6 +223,7 @@ class algorithms{ } scalefactor = 1.0;//2.0 * MAXMIN / max(maxX - minX, maxY - minY); //#pragma omp parallel for schedule(static) + /* for(int i = 0; i < graph.rows; i++){ nCoordinates[i] = nCoordinates[i] * scalefactor; maxX = max(maxX, nCoordinates[i].x); @@ -234,6 +235,7 @@ class algorithms{ maxV = max(maxV, fabs(minX)); maxV = max(maxV, fabs(minY)); } + */ } INDEXTYPE randIndex(INDEXTYPE max_num, INDEXTYPE min_num){ const INDEXTYPE newIndex = (rand() % (max_num - min_num)) + min_num; @@ -716,23 +718,8 @@ class algorithms{ for(INDEXTYPE k=0;k<2;k++) { INDEXTYPE ind = overlapped_labels[k]; - // continue this for 100 times - //for(INDEXTYPE l=0;l<1200;l++) - //for(INDEXTYPE l=0;l<600;l++) for(INDEXTYPE l=0;l dedgelength) - f += forceDiff * sqrt(attrc); + f += forceDiff * (graph.values[colj]/sqrt(attrc)); } for(INDEXTYPE j = 0; j < ns; j++){ forceDiff = samples[j] - nCoordinates[i]; @@ -876,14 +860,20 @@ class algorithms{ }else{ printf("No edge-crossing after force-updates!\n"); } - rescaleLayout(ITER, BATCHSIZE, lrforlo); - if(checkCrossing(LOOP)){ - printf("(after label attachment) Dead End!\n"); - } - postProcessing(scalingbox, psamples, pbox); - if(checkCrossing(LOOP)){ - printf("(after post-processing) Dead End!\n"); - } + + if(lrforlo > 0){ + rescaleLayout(ITER, BATCHSIZE, lrforlo); + if(checkCrossing(LOOP)){ + printf("(after label attachment) Dead End!\n"); + } + } + + if(ITERATIONS == 0){ + postProcessing(scalingbox, psamples, pbox); + if(checkCrossing(LOOP)){ + printf("(after post-processing) Dead End!\n"); + } + } end = omp_get_wtime(); cout << "BatchPrEL Parallel Wall time required:" << end - start << endl; result.push_back(end - start);