changing to NC versions of Preimages... #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PreImages, PreImagesElm, PreImagesSet and PreImagesRepresetnative, can all return incorrect results when the element(s) supplied are not in the range of the map.
This situation has been discussed in GAP issue #4809.
To rectify the situation the plan is to have NC versions of these four operations and to add tests to the non-NC versions.
The procedure to be adopted is as follows.
(1) Rename the four operations by adding 'NC' to their names, and then declare the original operations as synonyms of these. PR #5073 addresses this.
(2) Ask package authors/maintainers to convert all their calls to these functions to the NC versions (unless there is good reason not to do so).
A clause added to init.g ensures that the package still works in older versions of GAP.
(3) Once all the packages have been updated, add tests to the non-NC versions of the operations.
This PR attempts to implement (2) for package polycyclic. Why was this PR not made earlier when most of the other packages have made changes? Probably because of a comment by @fingolfin in PR#5073 that a major bug had to be fixed.
This PR defines 3 NC versions in init.g (PreImagesElm is not used) and changes calls to NC versions in 10 library files. A second commit makes a similar adjustment to some of the tests - perhaps these should not have been changed?
Changes made in the unmerged polycyclic PR#48 to the method for PreImagesSet have been included here (was that wise?).