MCPcopy Create free account
hub / github.com/MeigenChou/DCTimer-Android / init

Method init

app/src/main/java/cs/threephase/Center1.java:23–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21 static int[] finish = new int[48];
22
23 public static void init() {
24 Center1 c = new Center1();
25 int[] raw2sym = new int[735471];
26 int count = 0;
27 for (int i = 0; i < 735471; i++) {
28 if ((raw2sym[i] & 1) == 0) {
29 c.set(i);
30 for (int j = 0; j < 48; j++) {
31 int idx = c.get();
32 raw2sym[idx] = (count << 6 | syminv[j]) << 1 | 1;
33 c.rot(0);
34 if ((j & 1) == 1) c.rot(1);
35 if ((j & 7) == 7) c.rot(2);
36 if ((j & 15) == 15) c.rot(3);
37 }
38 sym2raw[count++] = i;
39 }
40 }
41 //Log.w("dct", "c1 move...");
42 Center1 d = new Center1();
43 for (int i = 0; i < 15582; i++) {
44 d.set(sym2raw[i]);
45 for (int m = 0; m < 36; m++) {
46 c.set(d);
47 c.move(m);
48 ctsmv[i][m] = raw2sym[c.get()] >> 1;
49 }
50 }
51 raw2sym = null;
52 System.gc();
53 }
54
55 int[] ct = new int[24];
56

Callers 1

initMethod · 0.95

Calls 4

setMethod · 0.95
getMethod · 0.95
rotMethod · 0.95
moveMethod · 0.95

Tested by

no test coverage detected