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

Method set

app/src/main/java/cs/threephase/Edge3.java:238–262  ·  view source on GitHub ↗
(EdgeCube c)

Source from the content-addressed store, hash-verified

236 }
237
238 int set(EdgeCube c) {
239 if (temp == null) {
240 temp = new int[12];
241 }
242 for (int i=0; i<12; i++) {
243 temp[i] = i;
244 edge[i] = c.ep[FullEdgeMap[i]+12]%12;
245 }
246 int parity = 1; //because of FullEdgeMap
247 for (int i=0; i<12; i++) {
248 while (edge[i] != i) {
249 int t = edge[i];
250 edge[i] = edge[t];
251 edge[t] = t;
252 int s = temp[i];
253 temp[i] = temp[t];
254 temp[t] = s;
255 parity ^= 1;
256 }
257 }
258 for (int i=0; i<12; i++) {
259 edge[i] = temp[c.ep[FullEdgeMap[i]]%12];
260 }
261 return parity;
262 }
263
264 private void set(Edge3 e) {
265// for (int i=0; i<12; i++) {

Callers 4

initMvrotMethod · 0.95
initRaw2SymMethod · 0.95
createPrunMethod · 0.95
getprunMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected