-
Notifications
You must be signed in to change notification settings - Fork 231
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
small NormalToricVarieties fix to retain CoefficientRing and Variable #3442
Conversation
); | ||
coneList' = for t in clStar list ( | ||
if all (s, i -> member (i,t)) then continue | ||
else t | {n} | ||
); | ||
Z := normalToricVariety (rays X | {v}, coneList | coneList'); | ||
Z := normalToricVariety (rays X | {v}, coneList | coneList', CoefficientRing => X.cache.CoefficientRing, Variable => X.cache.Variable); | ||
Z.cache.toricBlowup = X; |
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.
Do you know why the base X
is cached here but not above?
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.
Not sure I understand the question - where above would/should X be cached?
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.
Like 5 lines above, the other case where a toric variety is constructed and returned.
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.
Oh, I see now - I'm not sure why that differs. I could add the base into the cache, unless @ggsmith or anyone else has objections?
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.
For consistency, I think that the base toric variety should also be cached in the #s === 1
case. @Devlin-Mallory can you also make this change?
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!
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.
These changes look good to me.
); | ||
coneList' = for t in clStar list ( | ||
if all (s, i -> member (i,t)) then continue | ||
else t | {n} | ||
); | ||
Z := normalToricVariety (rays X | {v}, coneList | coneList'); | ||
Z := normalToricVariety (rays X | {v}, coneList | coneList', CoefficientRing => X.cache.CoefficientRing, Variable => X.cache.Variable); | ||
Z.cache.toricBlowup = X; |
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.
These changes look good to me.
Thanks for the fixes, and the review :) |
Several methods in NormalToricVarieties (notably toricBlowup and thus makeSmooth and makeSimplicial) were discarding the CoefficientRing and Variable of the input toric variety. This fixes that by retaining these options from the input toric variety.