read "itall.txt": with(queue): lvl:=4: phatlvl:=8: numpsis:=(3^(lvl+1)-3)/2: path:=cat("../data/","level",lvl,"/"): T:=gasket(phatlvl): ver:=ourVertices(phatlvl): smallver:=subsop(1=NULL,2=NULL,3=NULL,vertices(lvl)): make_neighbors(T,phatlvl,ver); Q:=new(); #enqueue(Q,[startv,0]); #currentdist:=-1; #currentlist:=[]; for i from 1 to numpsis do for vertex in ver do T[vertex,11]:=false: end do: readFunc(T,12,cat(path,phatlvl,"phat",lvl,"psi.",i)): currentdist:=-1; currentlist:=[]; enqueue(Q,[smallver[i],0]); fd:=fopen(cat(path,phatlvl,"phat",lvl,"minmaxdist.",i),WRITE); fprintf(fd,"%d phat %d psi min maxes function %d\n",phatlvl,lvl,i); while not empty(Q) do val:=dequeue(Q); #if val[1]=endv then # return(val[2]); #end if; if not (val[2]=currentdist) then if(currentdist>-1) then fprintf(fd,"dist %d=[%20.20g,%20.20g]\n",currentdist,min(op(currentlist)),max(op(currentlist))); end if; currentlist:=[]; currentdist:=val[2]; end if; currentlist:=[op(currentlist),T[val[1],12]]; if nops(val[1])<2 then numneighbors:=2; else numneighbors:=4; end if; for j from 1 to numneighbors do if not T[T[val[1],j],11] then enqueue(Q,[T[val[1],j],val[2]+1]); T[T[val[1],j],11]:=true; end if; end do; end do; fclose(fd); clear(Q); end do;