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

Method flipToIdx

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

Source from the content-addressed store, hash-verified

144
145 // flip
146 public static int flipToIdx(int[] flip, int length, boolean zeroSum) {
147 int idx = 0;
148 if (zeroSum) length--;
149 for (int i = 0; i < length; i++) {
150 idx = idx << 1 | flip[i];
151 }
152 return idx;
153 }
154
155 public static void idxToFlip(int[] flip, int index, int length, boolean zeroSum) {
156 int sum = 0;

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