pr_bar=pr_bar_; label_operation=label_operation_; FILE* f=fopen(fname,"r"); if(f==NULL) { dg=NULL; return; } char str[400]; fgets( str, 400, f ); sscanf( str, "%d %d %d", N+2, N+1, N ); //N[2]=N[1]=700; N[0]=708; ///!!!!!!!!! //if(DIM<3) N[2]=1; if(N[1]<=0) N[1]=N[0]; if(N[2]<=0) N[2]=N[1];// int temp_upsc=1,tu3=temp_upsc*temp_upsc*temp_upsc; N[0]/=temp_upsc; N[0]/=temp_upsc; N[0]/=temp_upsc; this->chmap=NULL; this->pres=NULL; int Nt=GetSize(); if(Nt<=0) { dg=NULL; return; } this->dg = new int[Nt]; memset(dg,inv,Nt); int ijk[3],i_,j_,k_; int cnt=0; int iperm=0; //index with permutation FILE* fff=fopen("LogLoad","w"); fprintf(fff,"%d %d %d %d\n",N[0],N[1],N[2],Nt); for( int i=0; i<Nt; i++ ) { if(feof(f)) break; i_=i/N[2]/N[1]; j_=(i/N[2])%N[1]; k_=i%N[2]; iperm=N[0]*N[1]*k_+N[0]*j_+i_; fscanf( f, "%d", dg+iperm ); dg[iperm]=!!dg[iperm]; cnt+=dg[iperm]; //dg[i]=!dg[i]; //inverting for more interesting tests //if(i>0.15*Nt) break; if(i%500==0) { fprintf(fff,"%d,%d where dg=[%d]\n",i,iperm,dg[iperm]); SetProgress((int)(i*100./Nt),"Loading index..."); } } fclose(fff);
if(i%500==0) { fprintf(fff,"%d,%d where dg=[%d]\n",i,iperm,dg[iperm]); SetProgress((int)(i*100./Nt),"Loading index..."); } }