-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LTermNP, LTermsNP and LMonNP; also add FactorOutGcdNP #32
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #32 +/- ##
=======================================
Coverage 84.64% 84.65%
=======================================
Files 31 31
Lines 4167 4189 +22
=======================================
+ Hits 3527 3546 +19
- Misses 640 643 +3
|
Now using this branch/PR to add any more NP-arithmetical functions that might be needed for the proposed IBNP package. In this case, have now added FactorOutGcdNP |
This now has conflicts and so can't be merged :-( |
After merging master, with the 4 merged PRs, the only remaining conflict required the removal of the no longer needed tst/test-functions.g. |
lib/nparith.gi
Outdated
if pol=[[],[]] then return(pol); fi; | ||
g := Gcd( pol[2] ); | ||
return([pol[1],pol[2]/g]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if pol=[[],[]] then return(pol); fi; | |
g := Gcd( pol[2] ); | |
return([pol[1],pol[2]/g]); | |
if pol=[[],[]] then | |
return pol; | |
fi; | |
g := Gcd( pol[2] ); | |
return [pol[1],pol[2]/g]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, but not done yet. There are lots of lines "if ... then ... fi;" in these files.
lib/nparith.gi
Outdated
end); | ||
|
||
InstallGlobalFunction( | ||
LTermsNP,function(lst) local i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that in the distant past, LMonsNP
used to be called LTermsNP
... but I guess it doesn't matter now :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was not aware of that. But these names make mathematical sense.
lib/nparith.gi
Outdated
InstallGlobalFunction( | ||
LTermsNP,function(lst) local i; | ||
return(List(lst,p->LTermNP(p))); | ||
end); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InstallGlobalFunction( | |
LTermsNP,function(lst) local i; | |
return(List(lst,p->LTermNP(p))); | |
end); | |
InstallGlobalFunction(LTermsNP, lst -> List(lst,LTermNP)); |
In general I would question the usefulness of such a trivial helper. I guess it can be justified here by arguing this is "for symmetry" with LMonNP
/ LMonsNP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed.
lib/nparith.gi
Outdated
InstallGlobalFunction( | ||
LMonsNP,function(lst) local i; | ||
return(List(lst,i->LMonNP(i))); | ||
end); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InstallGlobalFunction( | |
LMonsNP,function(lst) local i; | |
return(List(lst,i->LMonNP(i))); | |
end); | |
InstallGlobalFunction(LMonsNP, lst -> List(lst,LMonNP)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
lib/nparith.gi
Outdated
@@ -250,8 +259,80 @@ end);; | |||
### | |||
|
|||
InstallGlobalFunction( | |||
LMonsNP,function(pol) local i; | |||
return(List(pol,i->i[1][1])); | |||
LMonNP,function(pol) local i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMonNP,function(pol) local i; | |
LMonNP,function(pol) |
lib/nparith.gi
Outdated
InstallGlobalFunction( | ||
LTermNP,function(pol) local i; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InstallGlobalFunction( | |
LTermNP,function(pol) local i; | |
InstallGlobalFunction(LTermNP, function(pol) |
I cannot now find your comment about formatting problems (perhaps in another PR?) but, anyway, I have done a complete reformat of grobner.gi, which will no doubt be hard to inspect. Perhaps there are other files in a similar mess? Will have to look at all your recent comments first. |
Dealt with some of your latest comments and reformatted nparith.gi |
All tests pass except codecov/patch. Many of the changes reported as 'missed' are just changes of whitespace when tabs replaced by ' ', etc. |
There are over 80 conflicts now after merging your other PR. I strongly recommend to not mix whitespace changes and reformatting with other changes. It just leads to pain and suffering. Do those in separate PRs, and only do them when there are no other changes pending. Of course that advise comes far too later for this one :/ |
I tried discarding all formatting changes in this PR and rebase the rest. Let's see if tests pass. |
GBNP originally had LMonsNP, returning a list of leading monomials.
The planned IBNP package will requite the leading term, rather than the leading monomial, of a polynomial.
So it seemed sensible to add LTermNP, LTermsNP and LMonNP.
When adding an example to the manual the corresponding test file, tst/test-functions.tst, was changed: this file has been renamed in the PR nmo-tst, which may cause a problem?