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

Method setct

app/src/main/java/cs/threephase/Center3.java:111–146  ·  view source on GitHub ↗
(int idx)

Source from the content-addressed store, hash-verified

109 }
110
111 void setct(int idx) {
112 parity = idx & 1;
113 idx >>>= 1;
114 int idxrl = rl2std[idx % 12];
115 idx /= 12;
116 int r = 4;
117 for (int i = 7; i >= 0; i--) {
118 rl[i] = 0;
119 if (idxrl >= Cnk[i][r]) {
120 idxrl -= Cnk[i][r--];
121 rl[i] = 1;
122 }
123 }
124 int idxfb = idx % 35;
125 idx /= 35;
126 r = 4;
127 fb[7] = 0;
128 for (int i = 6; i >= 0; i--) {
129 if (idxfb >= Cnk[i][r]) {
130 idxfb -= Cnk[i][r--];
131 fb[i] = 1;
132 } else {
133 fb[i] = 0;
134 }
135 }
136 r = 4;
137 ud[7] = 0;
138 for (int i = 6; i >= 0; i--) {
139 if (idx >= Cnk[i][r]) {
140 idx -= Cnk[i][r--];
141 ud[i] = 1;
142 } else {
143 ud[i] = 0;
144 }
145 }
146 }
147
148 void move(int i) {
149 parity ^= pmove[i];

Callers 1

createMoveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected