Fix bugs in NormalizerPcpGroup#124
Open
stertooy wants to merge 5 commits into
Open
Conversation
Member
|
Should get a changelog entry |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #124 +/- ##
==========================================
+ Coverage 56.39% 56.44% +0.04%
==========================================
Files 87 87
Lines 12697 12703 +6
==========================================
+ Hits 7161 7170 +9
+ Misses 5536 5533 -3
🚀 New features to boost your workflow:
|
Contributor
Author
|
Changelog entry added, and I improved the tests a bit. It's going to give a merge conflict with #121 of course, I'll tackle that when it happens :) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves #122.
It seems there are two separate bugs at play here: one bug affects this function when
USE_CANONICAL_PCS@istrue, and another one affects it when the debug variable isfalse.In the former case, it seems
cc.solis not always zero, so it must be subtracted.In the latter case, the assumption in
VectorByComplement, i;e. that "igs and fac fit together", is wrong. We can resolve this by calculating a suitable igs ourselves, though this is slower.I tested this PR with the following code (based on one of the tests in
bugfix.tst). It tries 2000 pairs of groups `GOn the current master branch, testing this with
USE_CANONICAL_PCS@set totrueusually causes an error within the first 100-ish normalisers. WithUSE_CANONICAL_PCS@set tofalse, usually within the first 20.With this PR, both
trueandfalsepassed all 2000 tests.