| 167 | } |
| 168 | |
| 169 | bool MinorProcessor::setNextKeys(const int k) |
| 170 | { |
| 171 | /* This method moves _minor to the next valid (k x k)-minor within |
| 172 | _container. It returns true iff this is successful, i.e. iff |
| 173 | _minor did not already encode the terminal (k x k)-minor. */ |
| 174 | if (_minor.compare(MinorKey(0, 0, 0, 0)) == 0) |
| 175 | { |
| 176 | /* This means that we haven't started yet. Thus, we are about |
| 177 | to compute the first (k x k)-minor. */ |
| 178 | _minor.selectFirstRows(k, _container); |
| 179 | _minor.selectFirstColumns(k, _container); |
| 180 | return true; |
| 181 | } |
| 182 | else if (_minor.selectNextColumns(k, _container)) |
| 183 | { |
| 184 | /* Here we were able to pick a next subset of columns |
| 185 | within the same subset of rows. */ |
| 186 | return true; |
| 187 | } |
| 188 | else if (_minor.selectNextRows(k, _container)) |
| 189 | { |
| 190 | /* Here we were not able to pick a next subset of columns |
| 191 | within the same subset of rows. But we could pick a next |
| 192 | subset of rows. We must hence reset the subset of columns: */ |
| 193 | _minor.selectFirstColumns(k, _container); |
| 194 | return true; |
| 195 | } |
| 196 | else |
| 197 | { |
| 198 | /* We were neither able to pick a next subset |
| 199 | of columns nor of rows. I.e., we have iterated through |
| 200 | all sensible choices of subsets of rows and columns. */ |
| 201 | return false; |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | bool MinorProcessor::isEntryZero (const int /*absoluteRowIndex*/, |
| 206 | const int /*absoluteColumnIndex*/) const |
nothing calls this directly
no test coverage detected