search for: clusteraffectation2

Displaying 1 result from an estimated 1 matches for "clusteraffectation2".

2014 Mar 19
1
Memcheck: Invalid read of size 4
...-------- Here is the function kml1 from the file kml.c (I add some comments to tag the lines 151, 183 and 198) --- 8< ---------------- void kml1(double *traj, int *nbInd, int *nbTime, int *nbClusters, int *maxIt, int *clusterAffectation1, int *convergenceTime){ int i=0,iter=0; int *clusterAffectation2=malloc(*nbInd * sizeof(int)); // lines 151 double *trajMean=malloc(*nbClusters * *nbTime * sizeof(double)); for(i = 0; i < *nbClusters * *nbTime; i++){trajMean[i] = 0.0;}; for(i = 0; i < *nbInd; i++){clusterAffectation2[i] = 0;}; for(iter = 0; iter &...