-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorder methods after new implications are added
Many GAP methods get rank adjustments based on the rank of some filter, e.g, `RankFilter(IsAbelian)`. However, these ranks may change when new implications are added, e.g. when certain packages are loaded. But those method rank adjustments then won't be updated, which can ultimately lead to the effect that loading a package changes which methods get executed in otherwise identical code. This PR helps avoid that, by making it possible to set "dynamic" rank adjustments which get updated as new implications are added. Some cleverness is needed to make this work efficiently when loading packages. - Record rank adjustment in METHODS_OPERATION - Add RECALCULATE_ALL_METHOD_RANKS function which does what it says. - Adjust MethodsOperation to include base rank - Increase size of HIDDEN_IMPS_CACHE and WITH_IMPS_CACHE to speed up RECALCULATE_ALL_METHOD_RANKS() - Make sure RANK_FILTERS is always set promptly, then remove the test for it being unset in RankFilter - Automatically reorder methods after library or package loading, or InstallTrueMethod - Use COPY_LIST_ENTRIES in method installation to avoid making an intermediate list - Support passing a function of no arguments as the rank adjustment to InstallMethod - Reset reordering status on quit from break loop. Fixes #2513
- Loading branch information
1 parent
a3f05db
commit ea8f7d8
Showing
16 changed files
with
589 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.