MCPcopy Index your code
hub / github.com/MeigenChou/DCTimer-Android / getmv

Method getmv

app/src/main/java/solver/Cross.java:69–84  ·  view source on GitHub ↗
(int c, int po, int f)

Source from the content-addressed store, hash-verified

67 }
68
69 private static int getmv(int c, int po, int f) {
70 int[] arr = new int[12], ps = new int[4];
71 Utils.idxToPerm(ps, po, 4, false);
72 idxToComb(arr, ps, c, po);
73 edgemv(arr, f);
74 c = po = 0;
75 int q = 4;
76 for (int t = 0; t < 12; t++)
77 if (arr[t] >= 0) {
78 c += Cnk[11 - t][q--];
79 ps[q] = arr[t] >> 1;
80 po |= (arr[t] & 1) << 3 - q;
81 }
82 int i = Utils.permToIdx(ps, 4, false);//permToIdx(pm);
83 return 24 * c + i << 4 | po;
84 }
85
86 static void edgemv(int[] arr, int m) {
87 switch (m) {

Callers 1

initMethod · 0.95

Calls 4

idxToPermMethod · 0.95
idxToCombMethod · 0.95
edgemvMethod · 0.95
permToIdxMethod · 0.95

Tested by

no test coverage detected