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

Method idxToFlip

app/src/main/java/solver/Utils.java:155–163  ·  view source on GitHub ↗
(int[] flip, int index, int length, boolean zeroSum)

Source from the content-addressed store, hash-verified

153 }
154
155 public static void idxToFlip(int[] flip, int index, int length, boolean zeroSum) {
156 int sum = 0;
157 if (zeroSum) length--;
158 for (int i = length - 1; i >= 0; i--) {
159 sum ^= flip[i] = index & 1;
160 index >>= 1;
161 }
162 if (zeroSum) flip[length] = sum;
163 }
164
165 // orientation
166 public static int oriToIdx(int[] orientation, int length, boolean zeroSum) {

Callers 5

RouxMUClass · 0.95
flipMoveMethod · 0.95
EOlineClass · 0.95
scrambleL4EMethod · 0.95
getflpmvMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected