Commit 01b14f30 authored by pmla's avatar pmla

reduced memory usage

parent 650f4d77
Pipeline #24557070 canceled with stage
......@@ -500,9 +500,9 @@ bool GrainSegmentationEngine::modularitySegmentation()
// Create a particle -> subgraph mapping
std::vector<size_t> vIndex(_numSuperclusters, 0);
std::vector<size_t> atomCumulative(_numSuperclusters);
std::vector<size_t> particleToVertexId(numAtoms);
std::vector<size_t> vertexToParticleId(numAtoms);
std::vector<size_t> atomCumulative(_numSuperclusters);
std::vector<double> orderedRMSD(numAtoms);
atomCumulative[0] = 0;
std::partial_sum(_superclusterSizes.begin(), _superclusterSizes.end() - 1, atomCumulative.begin() + 1);
......@@ -596,7 +596,7 @@ clock_t startTime = clock();
printf("refining supercluster: %lu\n", scIndex);
size_t numVertices = vIndex[scIndex];
std::vector<int> community(numVertices);
std::vector<size_t> community(numVertices);
assign_communities_halfedge( numVertices, numEdges.begin() + atomCumulative[scIndex], orderedRMSD.begin() + atomCumulative[scIndex],
numSuperclusterEdges[scIndex],
adjlist.begin() + edgeCumulative[atomCumulative[scIndex]],
......
......@@ -35,8 +35,8 @@
#include <vector>
int assign_communities_halfedge(size_t numVertices, std::vector<size_t>::iterator adjdegrees, std::vector<double>::iterator rmsds,
size_t numEdges, std::vector<size_t>::iterator adjlist, std::vector<double>::iterator adjweight, double total_weight, std::vector< int > &n2c);
size_t assign_communities_halfedge(size_t numVertices, std::vector<size_t>::iterator adjdegrees, std::vector<double>::iterator rmsds,
size_t numEdges, std::vector<size_t>::iterator adjlist, std::vector<double>::iterator adjweight, double total_weight, std::vector< size_t > &n2c);
#endif // LOUVAIN_H
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