 	int *xmem = new int(num);
 
 	int i;
-	for(i=1; i<num; i++ ){
+	for(i=0; i<num; i++ ){
 		K[i] = Kforall;
 		epssqr[i] = epssqrforall;
 		xmem[i] = 0;

int solution_get_cluster_id(int t, int T){
	int id_cluster = 0;
	double coeff = (double)T/4.0;
	if(t >= coeff && t < 2*coeff){
		id_cluster = 1;
	}
	if(t >= 2*coeff && t < 3*coeff){
		id_cluster = 2;
	}
	if(t >= 3*coeff){
		id_cluster = 3;
	}



	/* save results into VTK file */
	coutMaster << "--- SAVING VTK ---" << std::endl;
	example::KMeans3D::saveVTK("results/kmeans",".vtk",T,num,K,mydata.get_datavector(),mydata.get_gammavector());
	coutAll.synchronize();
	
	/* print timers */
