recordPatternInReverse static method
Implementation
static void recordPatternInReverse(
BitArray row,
int start,
List<int> counters,
) {
// This could be more efficient I guess
int numTransitionsLeft = counters.length;
bool last = row.get(start);
while (start > 0 && numTransitionsLeft >= 0) {
if (row.get(--start) != last) {
numTransitionsLeft--;
last = !last;
}
}
if (numTransitionsLeft >= 0) {
throw NotFoundException.instance;
}
recordPattern(row, start + 1, counters);
}