-
Notifications
You must be signed in to change notification settings - Fork 236
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
New options added and bugs fixed in ConwayPolynomials #1179
Conversation
export { | ||
"conwayPolynomial", | ||
-- options to set the variable to use | ||
"Variable" |
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.
"Variable" is a symbol in the Core package, so just use it -- don't export a new one with the same name.
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.
Gotcha! Just changed!
fix := (p,n,co,a) -> sum(#co, i -> co#i * a^i) | ||
conwayPolynomial = method() | ||
conwayPolynomial(ZZ,ZZ) := (p,n) -> ( | ||
conwayPolynomial = method(Options=>{Variable=>getSymbol "a"}) |
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.
I think that if you run ' installPackage "ConwayPolynomials" ', this change will lead to a problem -- the error message will be something like " can't determine package of symbol a ". The solution will be to let the default value be the string "a", and run getSymbol later.
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.
I rewrite this part by following the code in galois.m2
This is great, thank you. What is your name? Could you add some tests to ensure that everything works as expected? Actually, we have a big pull request coming up, so it might be good to add the test after we merge it, because it moves all the test files to another directory. |
I'm Zhan Jiang. I was working in the FastLinAlg group during the just past workshop (virtually in Cleveland). I just added one test case. |
I just remembered that the monoid ring construction function does "getSymbol" for us:
|
I removed |
Here is what I mean in the slack chat
The generator of the I think in |
Ah. Fixing that would be a good improvement, but beyond the scope of your pull request. Why don't you create a new issue for that, and volunteer for it, if you like? |
Pulling now. Go ahead and make a separate issue for the other problem, and refer to #1179 |
Changes:
Variable
toconwayPolynomial
. Now it supports to use user-designated variable as the polynomial variable.map(GaloisField,GaloisField)
. Now it works properly betweenGaloisFields
defined with user-designated variable.