genonelevel:=proc(T,lvl,endlvl, startlabel, path) local fe, fd, e, eps5, eps6, num6, num5, curlvl, lambda, i, j, label; num6:=((3^lvl)-3)/2; num5:=((3^(lvl-1))+3)/2; label:=startlabel; #fprintf(fd,"%20.20g\n",T[vertex,funcnum]); if (lvl = 1 and endlvl > lvl) then eps5:=rp([1,-1], (endlvl - lvl)); print("its there?"); readFunc(T,12,cat(path,"../level",lvl,"/ortheigen2level",lvl,".",1)); print("yes"); for e in eps5 do newAlgoWrapper(T,lvl,12,2,e); fd:=fopen(cat(path,endlvl,"lambdalist.txt"),APPEND); fe:=fopen(cat(path,endlvl,"biglambdalist.txt"),APPEND); fprintf(fd,"%20.20g\n",makeLambda(2,e)); fprintf(fe,"%20.20g\n",5^(endlvl-lvl)*makeLambda(2,e)); fclose(fd); fclose(fe); saveFunc(T,12,endlvl,cat(path,endlvl,"eigen.",label)); label:=label+1; end do; for i from 1 to 2 do print("level5?"); print(path); print(lvl); readFunc(T,12,cat(path,"../level",lvl,"/ortheigen5level",lvl,".",i)); print("yes"); for e in eps5 do newAlgoWrapper(T,lvl,12,5,e); fd:=fopen(cat(path,endlvl,"lambdalist.txt"),APPEND); fe:=fopen(cat(path,endlvl,"biglambdalist.txt"),APPEND); fprintf(fd,"%20.20g\n",makeLambda(5,e)); fprintf(fe,"%20.20g\n",5^(endlvl-lvl)*makeLambda(5,e)); fclose(fd); fclose(fe); saveFunc(T,12,endlvl,cat(path,endlvl,"eigen.",label)); label:=label+1; end do; end do; end if; if (lvl = 1 and endlvl = lvl) then print("lvl2?again"); readFunc(T,12,cat(path,"../level",lvl,"/ortheigen2level",lvl,".",1)); print("yes"); fd:=fopen(cat(path,endlvl,"lambdalist.txt"),APPEND); fe:=fopen(cat(path,endlvl,"biglambdalist.txt"),APPEND); fprintf(fd,"%20.20g\n",2); fprintf(fe,"%20.20g\n",5^(endlvl-lvl)*2); fclose(fd); fclose(fe); saveFunc(T,12,endlvl,cat(path,endlvl,"eigen.",label)); label:=label+1; for i from 1 to 2 do readFunc(T,12,cat(path,"../level",lvl,"/ortheigen5level",lvl,".",i)); fd:=fopen(cat(path,endlvl,"lambdalist.txt"),APPEND); fe:=fopen(cat(path,endlvl,"biglambdalist.txt"),APPEND); fprintf(fd,"%20.20g\n",5); fprintf(fe,"%20.20g\n",5^(endlvl-lvl)*5); fclose(fd); fclose(fe); saveFunc(T,12,endlvl,cat(path,endlvl,"eigen.",label)); label:=label+1; end do; end if; if (lvl < endlvl and lvl >= 2) then eps5:=rp([+1,-1], (endlvl - lvl)); if ((endlvl - lvl) >= 2) then eps6:=rp([+1,-1], (endlvl - lvl -1)); #for e in eps6 do # e:=[+1,op(e)]; #end do; for j from 1 to nops(eps6) do eps6[j]:=[1,op(eps6[j])]; end do; else eps6:=[[+1]]; end if; for i from 1 to num5 do readFunc(T,12,cat(path,"../level",lvl,"/ortheigen5level",lvl,".",i)); for e in eps5 do newAlgoWrapper(T,lvl,12,5,e); fd:=fopen(cat(path,endlvl,"lambdalist.txt"),APPEND); fe:=fopen(cat(path,endlvl,"biglambdalist.txt"),APPEND); fprintf(fd,"%20.20g\n",makeLambda(5,e)); fprintf(fe,"%20.20g\n",5^(endlvl-lvl)*makeLambda(5,e)); fclose(fd); fclose(fe); saveFunc(T,12,endlvl,cat(path,endlvl,"eigen.",label)); label:=label+1; end do; end do; for i from 1 to num6 do readFunc(T,12,cat(path,"../level",lvl,"/ortheigen6level",lvl,".",i)); for e in eps6 do newAlgoWrapper(T,lvl,12,6,e); fd:=fopen(cat(path,endlvl,"lambdalist.txt"),APPEND); fe:=fopen(cat(path,endlvl,"biglambdalist.txt"),APPEND); fprintf(fd,"%20.20g\n",makeLambda(6,e)); fprintf(fe,"%20.20g\n",5^(endlvl-lvl)*makeLambda(6,e)); fclose(fd); fclose(fe); saveFunc(T,12,endlvl,cat(path,endlvl,"eigen.",label)); label:=label+1; end do; end do; end if; if (lvl = endlvl and lvl >=2) then for i from 1 to num5 do readFunc(T,12,cat(path,"../level",lvl,"/ortheigen5level",lvl,".",i)); fd:=fopen(cat(path,endlvl,"lambdalist.txt"),APPEND); fe:=fopen(cat(path,endlvl,"biglambdalist.txt"),APPEND); fprintf(fd,"%20.20g\n",5); fprintf(fe,"%20.20g\n",5^(endlvl-lvl)*5); fclose(fd); fclose(fe); saveFunc(T,12,endlvl,cat(path,endlvl,"eigen.",label)); label:=label+1; end do; for i from 1 to num6 do readFunc(T,12,cat(path,"../level",lvl,"/ortheigen6level",lvl,".",i)); fd:=fopen(cat(path,endlvl,"lambdalist.txt"),APPEND); fe:=fopen(cat(path,endlvl,"biglambdalist.txt"),APPEND); fprintf(fd,"%20.20g\n",6); fprintf(fe,"%20.20g\n",5^(endlvl-lvl)*6); fclose(fd); fclose(fe); saveFunc(T,12,endlvl,cat(path,endlvl,"eigen.",label)); label:=label+1; end do; end if; return(label); end; genalllevel:=proc(T,endlvl,path) local fe, fd, lvl, label; fd:=fopen(cat(path,endlvl,"lambdalist.txt"),WRITE); fclose(fd); fe:=fopen(cat(path,endlvl,"biglambdalist.txt"),WRITE); fclose(fe); label:=1; for lvl from 1 to endlvl do label:=genonelevel(T,lvl,endlvl, label, path); end do; end;