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

Method cornmv

app/src/main/java/solver/Roux.java:151–184  ·  view source on GitHub ↗
(int c, int po, int f)

Source from the content-addressed store, hash-verified

149 }
150
151 private static int cornmv(int c, int po, int f) {
152 int[] n = new int[8], s = new int[4];
153 getCorner(n, c, po, po);
154 switch (f) {
155 case 0:
156 Utils.circle(n, 0, 3, 2, 1); break;
157 case 1:
158 Utils.circle(n, 4, 5, 6, 7); break;
159 case 2:
160 Utils.circle(n, 0, 4, 7, 3, new int[] {2, 1, 2, 1});
161 //n[0] += 2; n[4]++; n[7] += 2; n[3]++;
162 break;
163 case 3:
164 Utils.circle(n, 1, 2, 6, 5, new int[] {1, 2, 1, 2});
165 //n[1]++; n[2] += 2; n[6]++; n[5] += 2;
166 break;
167 case 4:
168 Utils.circle(n, 2, 3, 7, 6, new int[] {1, 2, 1, 2});
169 //n[2]++; n[3] += 2; n[7]++; n[6] += 2;
170 break;
171 case 5:
172 Utils.circle(n, 0, 1, 5, 4, new int[] {1, 2, 1, 2});
173 //n[0]++; n[1] += 2; n[5]++; n[4] += 2;
174 break;
175 }
176 c = 0;
177 for (int q = 2, t = 7; t >= 0; t--)
178 if (n[t] >= 0) {
179 c += Utils.Cnk[t][q--];
180 s[q] = n[t] >> 3;
181 s[q + 2] = (n[t] & 7) % 3;
182 }
183 return (c * 2 + s[0]) * 9 + s[2] * 3 + s[3];
184 }
185
186 private static int edgemv2(int c, int p, int o, int f) {
187 int[] n = new int[9], s = new int[3];

Callers 1

initrMethod · 0.95

Calls 2

getCornerMethod · 0.95
circleMethod · 0.95

Tested by

no test coverage detected