Exemplo n.º 1
0
void collectCellCountMaskInfo(House &house, CellCountMaskArray &cell_masks) {
  for (std::size_t i = 0; i < 9; ++i) {
    cell_masks[i] = 0;
  }
  for (auto &cell : house) {
    auto *candidates = &cell->candidates;
    for (std::size_t i = 0; i < 9; ++i) {
      if ((*candidates)[i]) {
        cell_masks[i] |= (1 << house.getLinearID(cell));
      }
    }
  }
}