MCPcopy Create free account
hub / github.com/Singular/Singular / setNextKeys

Method setNextKeys

kernel/linear_algebra/MinorProcessor.cc:169–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169bool 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
205bool MinorProcessor::isEntryZero (const int /*absoluteRowIndex*/,
206 const int /*absoluteColumnIndex*/) const

Callers

nothing calls this directly

Calls 6

MinorKeyClass · 0.85
selectFirstRowsMethod · 0.80
selectFirstColumnsMethod · 0.80
selectNextColumnsMethod · 0.80
selectNextRowsMethod · 0.80
compareMethod · 0.45

Tested by

no test coverage detected