diff --git a/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/parallelLouvainMethodNoMap.cpp b/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/parallelLouvainMethodNoMap.cpp index 834c4b5ef..7fcc6ee3a 100644 --- a/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/parallelLouvainMethodNoMap.cpp +++ b/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/parallelLouvainMethodNoMap.cpp @@ -46,7 +46,7 @@ using namespace std; -double parallelLouvianMethodNoMap(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, +double parallelLouvianMethodNoMap(graph *G, long *C, int nThreads, double Lower, double thresh, double *totTime, int *numItr) { #ifdef PRINT_DETAILED_STATS_ #endif @@ -109,7 +109,7 @@ double parallelLouvianMethodNoMap(graph *G, mgp_graph *mg_graph, long *C, int nT //Initialize each vertex to its own cluster // initCommAss(pastCommAss, currCommAss, NV); - initCommAssOpt(pastCommAss, currCommAss, NV, clusterLocalMap, vtxPtr, vtxInd, cInfo, constantForSecondTerm, vDegree, mg_graph); + initCommAssOpt(pastCommAss, currCommAss, NV, clusterLocalMap, vtxPtr, vtxInd, cInfo, constantForSecondTerm, vDegree); time2 = omp_get_wtime(); diff --git a/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/parallelLouvainMethodNoMapFastTrackResistance.cpp b/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/parallelLouvainMethodNoMapFastTrackResistance.cpp index a02a32b10..b35f70443 100644 --- a/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/parallelLouvainMethodNoMapFastTrackResistance.cpp +++ b/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/parallelLouvainMethodNoMapFastTrackResistance.cpp @@ -46,7 +46,7 @@ using namespace std; -double parallelLouvianMethodNoMapFastTrackResistance(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, +double parallelLouvianMethodNoMapFastTrackResistance(graph *G, long *C, int nThreads, double Lower, double thresh, double *totTime, int *numItr, int phase, double* rmin, double* finMod) { #ifdef PRINT_DETAILED_STATS_ #endif @@ -110,7 +110,7 @@ double parallelLouvianMethodNoMapFastTrackResistance(graph *G, mgp_graph *mg_gra //Initialize each vertex to its own cluster // initCommAss(pastCommAss, currCommAss, NV); - initCommAssOpt(pastCommAss, currCommAss, NV, clusterLocalMap, vtxPtr, vtxInd, cInfo, constantForSecondTerm, vDegree, mg_graph); + initCommAssOpt(pastCommAss, currCommAss, NV, clusterLocalMap, vtxPtr, vtxInd, cInfo, constantForSecondTerm, vDegree); time2 = omp_get_wtime(); diff --git a/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasic.cpp b/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasic.cpp index cdace6b47..247063f2f 100644 --- a/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasic.cpp +++ b/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasic.cpp @@ -78,7 +78,7 @@ void runMultiPhaseBasic(graph *G, mgp_graph *mg_graph, long *C_orig, int basicOp if(basicOpt == 1){ - currMod = parallelLouvianMethodNoMap(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); + currMod = parallelLouvianMethodNoMap(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); }else if(threadsOpt == 1){ currMod = parallelLouvianMethod(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); //currMod = parallelLouvianMethodApprox(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); @@ -175,7 +175,7 @@ void runMultiPhaseBasicOnce(graph *G, mgp_graph *mg_graph, long *C_orig, int bas prevMod = currMod; if(basicOpt == 1){ - currMod = parallelLouvianMethodNoMap(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); + currMod = parallelLouvianMethodNoMap(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); }else if(threadsOpt == 1){ currMod = parallelLouvianMethod(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); //currMod = parallelLouvianMethodApprox(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); diff --git a/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasicApprox.cpp b/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasicApprox.cpp index b2ec44f73..e46221d10 100644 --- a/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasicApprox.cpp +++ b/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasicApprox.cpp @@ -76,7 +76,7 @@ void runMultiPhaseBasicApprox(graph *G, mgp_graph *mg_graph, long *C_orig, int b if(basicOpt == 1){ - currMod = parallelLouvianMethodNoMap(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); + currMod = parallelLouvianMethodNoMap(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); }else if(threadsOpt == 1){ //currMod = parallelLouvianMethod(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); currMod = parallelLouvianMethodApprox(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr, percentage); diff --git a/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasicFastTrackResistance.cpp b/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasicFastTrackResistance.cpp index 31fa78b24..42367c139 100644 --- a/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasicFastTrackResistance.cpp +++ b/cpp/community_detection_module/grappolo/BasicCommunitiesDetection/runMultiPhaseBasicFastTrackResistance.cpp @@ -77,7 +77,7 @@ void runMultiPhaseBasicFastTrackResistance(graph *G, mgp_graph *mg_graph, long * // TODO add coloring routines when the basic has stabilized if(basicOpt == 1){ - currModAFG = parallelLouvianMethodNoMapFastTrackResistance(G, mg_graph, C, numThreads, currModAFG, threshold, &tmpTime, &tmpItr, phase, &rmin, &finMod); + currModAFG = parallelLouvianMethodNoMapFastTrackResistance(G, C, numThreads, currModAFG, threshold, &tmpTime, &tmpItr, phase, &rmin, &finMod); }else if(threadsOpt == 1){ currModAFG = parallelLouvianMethodFastTrackResistance(G, mg_graph, C, numThreads, currModAFG, threshold, &tmpTime, &tmpItr, phase, &rmin, &finMod); }else{ diff --git a/cpp/community_detection_module/grappolo/Coloring/coloringDistanceOne.cpp b/cpp/community_detection_module/grappolo/Coloring/coloringDistanceOne.cpp index 55081555a..644901e4f 100644 --- a/cpp/community_detection_module/grappolo/Coloring/coloringDistanceOne.cpp +++ b/cpp/community_detection_module/grappolo/Coloring/coloringDistanceOne.cpp @@ -47,7 +47,7 @@ ////////////////////////// DISTANCE ONE COLORING /////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////// //Return the number of colors used (zero is a valid color) -int algoDistanceOneVertexColoringOpt(graph *G, mgp_graph *mg_graph, int *vtxColor, int nThreads, double *totTime) +int algoDistanceOneVertexColoringOpt(graph *G, int *vtxColor, int nThreads, double *totTime) { #ifdef PRINT_DETAILED_STATS_ #endif @@ -216,7 +216,7 @@ int algoDistanceOneVertexColoringOpt(graph *G, mgp_graph *mg_graph, int *vtxColo ////////////////////////// DISTANCE ONE COLORING /////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////// //Return the number of colors used (zero is a valid color) -int algoDistanceOneVertexColoring(graph *G, mgp_graph *mg_graph, int *vtxColor, int nThreads, double *totTime) +int algoDistanceOneVertexColoring(graph *G, int *vtxColor, int nThreads, double *totTime) { if (nThreads < 1) omp_set_num_threads(1); //default to one thread diff --git a/cpp/community_detection_module/grappolo/Coloring/coloringMultiHashMaxMin.cpp b/cpp/community_detection_module/grappolo/Coloring/coloringMultiHashMaxMin.cpp index 4d687250e..15a4d42ce 100644 --- a/cpp/community_detection_module/grappolo/Coloring/coloringMultiHashMaxMin.cpp +++ b/cpp/community_detection_module/grappolo/Coloring/coloringMultiHashMaxMin.cpp @@ -58,7 +58,7 @@ void generateRandomNumbers2(double* randValues, long NVer) } } -int algoColoringMultiHashMaxMin(graph *G, mgp_graph *mg_graph, int *vtxColor, int nThreads, double *totTime, int nHash, int nItrs) +int algoColoringMultiHashMaxMin(graph *G, int *vtxColor, int nThreads, double *totTime, int nHash, int nItrs) { #ifdef PRINT_DETAILED_STATS_ std::cout << "Within algoColoringMultiHashMaxMin(nHash= " << nHash << " -- nItrs= " << nItrs << ")\n"; diff --git a/cpp/community_detection_module/grappolo/Coloring/parallelLouvainWithColoringNoMap.cpp b/cpp/community_detection_module/grappolo/Coloring/parallelLouvainWithColoringNoMap.cpp index d86d66973..49d80dcc8 100644 --- a/cpp/community_detection_module/grappolo/Coloring/parallelLouvainWithColoringNoMap.cpp +++ b/cpp/community_detection_module/grappolo/Coloring/parallelLouvainWithColoringNoMap.cpp @@ -45,7 +45,7 @@ #include "color_comm.h" using namespace std; -double algoLouvainWithDistOneColoringNoMap(graph* G, mgp_graph *mg_graph, long *C, int nThreads, int* color, +double algoLouvainWithDistOneColoringNoMap(graph* G, long *C, int nThreads, int* color, int numColor, double Lower, double thresh, double *totTime, int *numItr) { #ifdef PRINT_DETAILED_STATS_ #endif diff --git a/cpp/community_detection_module/grappolo/Coloring/runMultiPhaseColoring.cpp b/cpp/community_detection_module/grappolo/Coloring/runMultiPhaseColoring.cpp index e6bf9b913..427bee5ff 100644 --- a/cpp/community_detection_module/grappolo/Coloring/runMultiPhaseColoring.cpp +++ b/cpp/community_detection_module/grappolo/Coloring/runMultiPhaseColoring.cpp @@ -66,7 +66,7 @@ void runMultiPhaseColoring(graph *G, mgp_graph *mg_graph, long *C_orig, int colo int nColors = 0; // Coloring Steps if((coloring == 1)||(coloring == 2)) { - nColors = algoDistanceOneVertexColoringOpt(G, mg_graph, colors, numThreads, &tmpTime)+1; + nColors = algoDistanceOneVertexColoringOpt(G, colors, numThreads, &tmpTime)+1; totTimeColoring += tmpTime; //Check if balanced coloring is enabled: if(coloring == 2) @@ -80,7 +80,7 @@ void runMultiPhaseColoring(graph *G, mgp_graph *mg_graph, long *C_orig, int colo if (nItrs <= 0) nItrs = 1; //int nItrs = numColors / 4; - nColors = algoColoringMultiHashMaxMin(G, mg_graph, colors, numThreads, &tmpTime, nHash, nItrs)+1; + nColors = algoColoringMultiHashMaxMin(G, colors, numThreads, &tmpTime, nHash, nItrs)+1; totTimeColoring += tmpTime; } @@ -105,14 +105,14 @@ void runMultiPhaseColoring(graph *G, mgp_graph *mg_graph, long *C_orig, int colo if(nonColor == false) { //Use higher modularity for the first few iterations when graph is big enough if (replaceMap == 1) - currMod = algoLouvainWithDistOneColoringNoMap(G, mg_graph, C, numThreads, colors, nColors, currMod, C_threshold, &tmpTime, &tmpItr); + currMod = algoLouvainWithDistOneColoringNoMap(G, C, numThreads, colors, nColors, currMod, C_threshold, &tmpTime, &tmpItr); else currMod = algoLouvainWithDistOneColoring(G, mg_graph, C, numThreads, colors, nColors, currMod, C_threshold, &tmpTime, &tmpItr); totTimeClustering += tmpTime; totItr += tmpItr; } else { if (replaceMap == 1) - currMod = parallelLouvianMethodNoMap(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); + currMod = parallelLouvianMethodNoMap(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); else currMod = parallelLouvianMethod(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); totTimeClustering += tmpTime; @@ -171,7 +171,7 @@ void runMultiPhaseColoring(graph *G, mgp_graph *mg_graph, long *C_orig, int colo nColors = 0; // Coloring Steps if((coloring == 1)||(coloring == 2)) { - nColors = algoDistanceOneVertexColoringOpt(G, mg_graph, colors, numThreads, &tmpTime)+1; + nColors = algoDistanceOneVertexColoringOpt(G, colors, numThreads, &tmpTime)+1; totTimeColoring += tmpTime; //Check if balanced coloring is enabled: if(coloring == 2) @@ -185,7 +185,7 @@ void runMultiPhaseColoring(graph *G, mgp_graph *mg_graph, long *C_orig, int colo if (nItrs <= 0) nItrs = 1; //int nItrs = numColors / 4; - nColors = algoColoringMultiHashMaxMin(G, mg_graph, colors, numThreads, &tmpTime, nHash, nItrs)+1; + nColors = algoColoringMultiHashMaxMin(G, colors, numThreads, &tmpTime, nHash, nItrs)+1; totTimeColoring += tmpTime; } } diff --git a/cpp/community_detection_module/grappolo/Coloring/vBase.cpp b/cpp/community_detection_module/grappolo/Coloring/vBase.cpp index 0b1fdf8c0..070ebed90 100644 --- a/cpp/community_detection_module/grappolo/Coloring/vBase.cpp +++ b/cpp/community_detection_module/grappolo/Coloring/vBase.cpp @@ -1,4 +1,3 @@ -#include #include "coloringUtils.h" #include "defs.h" #include "coloring.h" diff --git a/cpp/community_detection_module/grappolo/DefineStructure/basic_comm.h b/cpp/community_detection_module/grappolo/DefineStructure/basic_comm.h index 23b1a54f1..aaa0d0c9f 100644 --- a/cpp/community_detection_module/grappolo/DefineStructure/basic_comm.h +++ b/cpp/community_detection_module/grappolo/DefineStructure/basic_comm.h @@ -25,7 +25,7 @@ double parallelLouvianMethod(graph *G, mgp_graph *mg_graph, long *C, int nThread double parallelLouvianMethodApprox(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, double thresh, double *totTime, int *numItr, int percentage); -double parallelLouvianMethodNoMap(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, +double parallelLouvianMethodNoMap(graph *G, long *C, int nThreads, double Lower, double thresh, double *totTime, int *numItr); double parallelLouvianMethodScale(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, @@ -41,7 +41,7 @@ double parallelLouvianMethodFastTrackResistance(graph *G, mgp_graph *mg_graph, l double thresh, double *totTime, int *numItr, int phase, double* rmin, double* finMod); // Define in parallelLouvianMethodNoMapFastTrackResistance.cpp -double parallelLouvianMethodNoMapFastTrackResistance(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, +double parallelLouvianMethodNoMapFastTrackResistance(graph *G, long *C, int nThreads, double Lower, double thresh, double *totTime, int *numItr, int phase, double* rmin, double* finMod); // Define in parallelLouvianMethodScaleFastTrackResistance.cpp diff --git a/cpp/community_detection_module/grappolo/DefineStructure/color_comm.h b/cpp/community_detection_module/grappolo/DefineStructure/color_comm.h index 57907493c..40ce9e41e 100644 --- a/cpp/community_detection_module/grappolo/DefineStructure/color_comm.h +++ b/cpp/community_detection_module/grappolo/DefineStructure/color_comm.h @@ -10,7 +10,7 @@ void runMultiPhaseColoring(graph *G, mgp_graph *mg_graph, long *C_orig, int colo double algoLouvainWithDistOneColoring(graph* G, mgp_graph *mg_graph, long *C, int nThreads, int* color, int numColor, double Lower, double thresh, double *totTime, int *numItr); -double algoLouvainWithDistOneColoringNoMap(graph* G, mgp_graph *mg_graph, long *C, int nThreads, int* color, +double algoLouvainWithDistOneColoringNoMap(graph* G, long *C, int nThreads, int* color, int numColor, double Lower, double thresh, double *totTime, int *numItr); #endif diff --git a/cpp/community_detection_module/grappolo/DefineStructure/coloring.h b/cpp/community_detection_module/grappolo/DefineStructure/coloring.h index fe7d265cd..4f505d3d9 100644 --- a/cpp/community_detection_module/grappolo/DefineStructure/coloring.h +++ b/cpp/community_detection_module/grappolo/DefineStructure/coloring.h @@ -5,11 +5,11 @@ #include "coloringUtils.h" // In coloringDistanceOne.cpp -int algoDistanceOneVertexColoringOpt(graph *G, mgp_graph *mg_graph, int *vtxColor, int nThreads, double *totTime); -int algoDistanceOneVertexColoring(graph *G, mgp_graph *mg_graph, int *vtxColor, int nThreads, double *totTime); +int algoDistanceOneVertexColoringOpt(graph *G, int *vtxColor, int nThreads, double *totTime); +int algoDistanceOneVertexColoring(graph *G, int *vtxColor, int nThreads, double *totTime); // In ColoringMultiHasMaxMin.cpp -int algoColoringMultiHashMaxMin(graph *G, mgp_graph *mg_graph, int *vtxColor, int nThreads, double *totTime, int nHash, int nItrs); +int algoColoringMultiHashMaxMin(graph *G, int *vtxColor, int nThreads, double *totTime, int nHash, int nItrs); // In vBase.cpp int vBaseRedistribution(graph* G, int* vtxColor, int ncolors, int type); diff --git a/cpp/community_detection_module/grappolo/DefineStructure/defs.h b/cpp/community_detection_module/grappolo/DefineStructure/defs.h index fc2a150f7..ce1320754 100644 --- a/cpp/community_detection_module/grappolo/DefineStructure/defs.h +++ b/cpp/community_detection_module/grappolo/DefineStructure/defs.h @@ -132,7 +132,7 @@ struct clustering_parameters }; //Reverse Cuthill-McKee Algorithm -void algoReverseCuthillMcKee( graph *G, mgp_graph *mg_graph, long *pOrder, int nThreads ); +void algoReverseCuthillMcKee( graph *G, long *pOrder, int nThreads ); void algoReverseCuthillMcKeeStrict( graph *G, long *pOrder, int nThreads ); #endif diff --git a/cpp/community_detection_module/grappolo/DefineStructure/sync_comm.h b/cpp/community_detection_module/grappolo/DefineStructure/sync_comm.h index 75d89ad6a..6fa626e77 100644 --- a/cpp/community_detection_module/grappolo/DefineStructure/sync_comm.h +++ b/cpp/community_detection_module/grappolo/DefineStructure/sync_comm.h @@ -8,13 +8,13 @@ void runMultiPhaseSyncType(graph *G, mgp_graph *mg_graph, long *C_orig, int syncType, long minGraphSize, double threshold, double C_threshold, int numThreads, int threadsOpt); -double parallelLouvainMethodFullSyncEarly(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, +double parallelLouvainMethodFullSyncEarly(graph *G, long *C, int nThreads, double Lower, double thresh, double *totTime, int *numItr,int ytype, int freedom); -double parallelLouvainMethodFullSync(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, +double parallelLouvainMethodFullSync(graph *G, long *C, int nThreads, double Lower, double thresh, double *totTime, int *numItr,int ytype, int freedom); -double parallelLouvianMethodEarlyTerminate(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, +double parallelLouvianMethodEarlyTerminate(graph *G, long *C, int nThreads, double Lower, double thresh, double *totTime, int *numItr); // Define in fullSyncUtility.cpp diff --git a/cpp/community_detection_module/grappolo/DefineStructure/utilityClusteringFunctions.h b/cpp/community_detection_module/grappolo/DefineStructure/utilityClusteringFunctions.h index f2f16940c..271318f14 100644 --- a/cpp/community_detection_module/grappolo/DefineStructure/utilityClusteringFunctions.h +++ b/cpp/community_detection_module/grappolo/DefineStructure/utilityClusteringFunctions.h @@ -54,7 +54,7 @@ void initCommAss(long* pastCommAss, long* currCommAss, long NV); void initCommAssOpt(long* pastCommAss, long* currCommAss, long NV, mapElement* clusterLocalMap, long* vtxPtr, edge* vtxInd, - Comm* cInfo, double constant, double* vDegree, mgp_graph *mg_graph); + Comm* cInfo, double constant, double* vDegree); double buildLocalMapCounter(long adj1, long adj2, map &clusterLocalMap, vector &Counter, edge* vtxInd, long* currCommAss, long me); diff --git a/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodEarlyTerminate.cpp b/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodEarlyTerminate.cpp index f6fa1f8a6..5f846f03e 100644 --- a/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodEarlyTerminate.cpp +++ b/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodEarlyTerminate.cpp @@ -40,13 +40,12 @@ // ************************************************************************ #include "defs.h" -#include "mg_procedure.h" #include "utilityClusteringFunctions.h" #include "sync_comm.h" using namespace std; -double parallelLouvianMethodEarlyTerminate(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, +double parallelLouvianMethodEarlyTerminate(graph *G, long *C, int nThreads, double Lower, double thresh, double *totTime, int *numItr) { #ifdef PRINT_DETAILED_STATS_ #endif @@ -110,7 +109,7 @@ double parallelLouvianMethodEarlyTerminate(graph *G, mgp_graph *mg_graph, long * //Initialize each vertex to its own cluster // initCommAss(pastCommAss, currCommAss, NV); - initCommAssOpt(pastCommAss, currCommAss, NV, clusterLocalMap, vtxPtr, vtxInd, cInfo, constantForSecondTerm, vDegree, mg_graph); + initCommAssOpt(pastCommAss, currCommAss, NV, clusterLocalMap, vtxPtr, vtxInd, cInfo, constantForSecondTerm, vDegree); // Store the termination node bool* verT = (bool *) malloc (NV * sizeof(bool)); assert(verT != 0); diff --git a/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodFullSync.cpp b/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodFullSync.cpp index 140412786..eb9741a85 100644 --- a/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodFullSync.cpp +++ b/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodFullSync.cpp @@ -40,13 +40,12 @@ // ************************************************************************ #include "defs.h" -#include "mg_procedure.h" #include "utilityClusteringFunctions.h" #include "sync_comm.h" using namespace std; -double parallelLouvainMethodFullSync(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, +double parallelLouvainMethodFullSync(graph *G, long *C, int nThreads, double Lower, double thresh, double *totTime, int *numItr,int ytype, int freedom) { #ifdef PRINT_DETAILED_STATS_ #endif diff --git a/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodFullSyncEarly.cpp b/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodFullSyncEarly.cpp index f5007beb1..058eae48e 100644 --- a/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodFullSyncEarly.cpp +++ b/cpp/community_detection_module/grappolo/FullSyncOptimization/parallelLouvainMethodFullSyncEarly.cpp @@ -40,13 +40,12 @@ // ************************************************************************ #include "defs.h" -#include "mg_procedure.h" #include "utilityClusteringFunctions.h" #include "sync_comm.h" using namespace std; -double parallelLouvainMethodFullSyncEarly(graph *G, mgp_graph *mg_graph, long *C, int nThreads, double Lower, +double parallelLouvainMethodFullSyncEarly(graph *G, long *C, int nThreads, double Lower, double thresh, double *totTime, int *numItr,int ytype, int freedom) { #ifdef PRINT_DETAILED_STATS_ #endif diff --git a/cpp/community_detection_module/grappolo/FullSyncOptimization/runMultiPhaseSyncType.cpp b/cpp/community_detection_module/grappolo/FullSyncOptimization/runMultiPhaseSyncType.cpp index cb190a6ba..0cf716839 100644 --- a/cpp/community_detection_module/grappolo/FullSyncOptimization/runMultiPhaseSyncType.cpp +++ b/cpp/community_detection_module/grappolo/FullSyncOptimization/runMultiPhaseSyncType.cpp @@ -79,30 +79,30 @@ void runMultiPhaseSyncType(graph *G, mgp_graph *mg_graph, long *C_orig, int sync if(nonET == false) { switch (syncType){ case 2: - currMod = parallelLouvainMethodFullSync(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr,syncType, freedom); + currMod = parallelLouvainMethodFullSync(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr,syncType, freedom); break; case 4: - currMod = parallelLouvainMethodFullSyncEarly(G, mg_graph, C, numThreads, currMod, C_threshold, &tmpTime, &tmpItr,syncType, freedom); + currMod = parallelLouvainMethodFullSyncEarly(G, C, numThreads, currMod, C_threshold, &tmpTime, &tmpItr,syncType, freedom); break; case 3: - currMod = parallelLouvianMethodEarlyTerminate(G, mg_graph, C, numThreads, currMod, C_threshold, &tmpTime, &tmpItr); break; + currMod = parallelLouvianMethodEarlyTerminate(G, C, numThreads, currMod, C_threshold, &tmpTime, &tmpItr); break; default: - currMod = parallelLouvainMethodFullSync(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr,syncType, freedom); + currMod = parallelLouvainMethodFullSync(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr,syncType, freedom); break; } } else { switch (syncType){ case 2: - currMod = parallelLouvainMethodFullSync(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr,syncType, freedom); + currMod = parallelLouvainMethodFullSync(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr,syncType, freedom); break; case 4: - currMod = parallelLouvainMethodFullSyncEarly(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr,syncType, freedom); + currMod = parallelLouvainMethodFullSyncEarly(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr,syncType, freedom); break; case 3: - currMod = parallelLouvianMethodEarlyTerminate(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); + currMod = parallelLouvianMethodEarlyTerminate(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr); break; default: - currMod = parallelLouvainMethodFullSync(G, mg_graph, C, numThreads, currMod, threshold, &tmpTime, &tmpItr,syncType, freedom); + currMod = parallelLouvainMethodFullSync(G, C, numThreads, currMod, threshold, &tmpTime, &tmpItr,syncType, freedom); break; } nonET = true; diff --git a/cpp/community_detection_module/grappolo/Utility/buildNextPhase.cpp b/cpp/community_detection_module/grappolo/Utility/buildNextPhase.cpp index 5d6ff28a0..ab9273de8 100644 --- a/cpp/community_detection_module/grappolo/Utility/buildNextPhase.cpp +++ b/cpp/community_detection_module/grappolo/Utility/buildNextPhase.cpp @@ -266,7 +266,7 @@ double buildNextLevelGraphOpt(graph *Gin, mgp_graph *mg_graph, graph *Gout, long }//End of buildNextLevelGraph2() //WARNING: Will assume that the cluster ids have been renumbered contiguously -void buildNextLevelGraph(graph *Gin, mgp_graph *mg_graph, graph *Gout, long *C, long numUniqueClusters) { +void buildNextLevelGraph(graph *Gin, graph *Gout, long *C, long numUniqueClusters) { #ifdef PRINT_DETAILED_STATS_ #endif double time1, time2, time3, time4; //For timing purposes diff --git a/cpp/community_detection_module/grappolo/Utility/reverseCuthillMcKee.cpp b/cpp/community_detection_module/grappolo/Utility/reverseCuthillMcKee.cpp index 0aa6fcf4e..6d035d2e7 100644 --- a/cpp/community_detection_module/grappolo/Utility/reverseCuthillMcKee.cpp +++ b/cpp/community_detection_module/grappolo/Utility/reverseCuthillMcKee.cpp @@ -31,7 +31,7 @@ // Perform reverse Cuthill-McKee operation on the graph // SSize indicates the size of Source // Sets the pointer in isChordal from one direction ONLY -void algoReverseCuthillMcKee(graph *G, mgp_graph *mg_graph, long *pOrder, int nThreads ) +void algoReverseCuthillMcKee(graph *G, long *pOrder, int nThreads ) { if (nThreads < 1) omp_set_num_threads(1); diff --git a/cpp/community_detection_module/grappolo/Utility/utilityClusteringFunctions.cpp b/cpp/community_detection_module/grappolo/Utility/utilityClusteringFunctions.cpp index 10fcc318d..9782b002a 100644 --- a/cpp/community_detection_module/grappolo/Utility/utilityClusteringFunctions.cpp +++ b/cpp/community_detection_module/grappolo/Utility/utilityClusteringFunctions.cpp @@ -40,7 +40,6 @@ // ************************************************************************ #include "utilityClusteringFunctions.h" -#include "mg_procedure.h" using namespace std; @@ -107,7 +106,7 @@ void initCommAss(long* pastCommAss, long* currCommAss, long NV) { //WARNING: Will ignore duplicate edge entries (multi-graph) void initCommAssOpt(long* pastCommAss, long* currCommAss, long NV, mapElement* clusterLocalMap, long* vtxPtr, edge* vtxInd, - Comm* cInfo, double constant, double* vDegree, mgp_graph *mg_graph) { + Comm* cInfo, double constant, double* vDegree) { #pragma omp parallel for for (long v=0; v