import java.applet.Applet; import java.awt.*; import java.awt.event.*; import java.applet.*; import java.awt.geom.*; import java.math.*; /**This routine does some sanity checks for the compactification theorem in the paper.*/ public class SanityCheck1 implements Runnable { Manager M; int halt; int LIMIT,RANGE; PinwheelMap PIN; public SanityCheck1(Manager MM) { this.M=MM; } public void run() { LIMIT=M.C.CON_C.getPointNumber(); RANGE=M.C.CON_C.getPointRange(); PIN=new PinwheelMap(); halt=1; int mode=M.C.CON_C.COMPACT.mode; if(mode==0) check0(); if(mode==1) check1(); if(mode==2) check2(); if(mode==3) check3(); if(mode==4) check4(); if(mode==5) check5(); if(mode==6) check6(); if(mode==7) check7(); if(mode==8) check8(); if(mode==9) check9(); if(mode==10) check10(); if(mode==11) check11(); } /**This is the most fundamental of all the checks in this class. It checks that the basic compactification is correct: If two points map into the same polyhedron then the return map is the same.**/ public void check0() { System.out.println("start:"); int trial=0; int k0=M.C.CON_C.INT[2].val; while((halt==1)&&(trial.000000001) return(false); } return(true); } /**This routine checks that tilde_Ek o tilde_theta = tilde_theta o Ek mod (4Z)^4*/ public void check1() { halt=1; System.out.print("start: "); int trial=0; while((halt==1)&&(trial.0000001) System.out.println("fail "); ++trial; } System.out.println("done "+trial); } /**checks that tilde_zeta o T = \tilde_zeta for T in (4Z)^4**/ public void check3() { System.out.println("start check2:"); int trial=0; while((halt==1)&&(trial.0000001) System.out.println("fail "); ++trial; } System.out.println("done "+trial); } /*checks that tilde_zeta o I_t = Identity for the 4 fundamental choices of t. We choose V randomly so that it stays within the specific fundamental domain F used in the paper.*/ public void check4() { System.out.println("start check 3:"); int trial=0; while((halt==1)&&(trial.0000001) { System.out.println("fail "); V.print(); } } ++trial; } System.out.println("done "+trial); } /**This routine contains a partial check that the embedding map tilde_theta maps Lk to tilde_Lk. The point is that the strip spanning vectors are mapped to (4Z) integer vectors. and tilde_Lk is invariant under (4Z)^4**/ public void check5() { Vector4 V=new Vector4(); Complex z=new Complex(); System.out.println("start check 4"); z=new Complex(0,4); V=Compactify.tilde_theta(z); V=Compactify.tilde_E(1,V); V.print(); z=new Complex(2,-2); V=Compactify.tilde_theta(z); V=Compactify.tilde_E(2,V); V.print(); double A=Math.sqrt(5)-2; z=new Complex(-2-2*A,0); V=Compactify.tilde_theta(z); V=Compactify.tilde_E(3,V); V.print(); z=new Complex(2,2); V=Compactify.tilde_theta(z); V=Compactify.tilde_E(4,V); V.print(); } /**checks that tilde_Ek o T = \tilde_Ek mod (4Z)^4 for T in (4Z)^4**/ public void check6() { System.out.println("start check 5:"); int trial=0; while((halt==1)&&(trial.0000001) System.out.println("fail "); ++trial; } System.out.println("done "+trial); } public void check11() { System.out.println("start:"); int trial=0; while((halt==1)&&(trial1.99999) W.x[0]=0; if(W.x[1]>1.99999) W.x[1]=0; if(Math.abs(W.x[0])<.000001) W.x[0]=0; if(Math.abs(W.x[1])<.000001) W.x[1]=0; if(Math.abs(W.x[2])<.000001) W.x[2]=0; return(W); } }