#5465: [with patch, positive review] render3d for groebner fans is totally
broken
----------------------+-----------------------------------------------------
Reporter: was | Owner: mhampton
Type: defect | Status: new
Priority: major | Milestone: sage-3.4.1
Component: geometry | Keywords:
----------------------+-----------------------------------------------------
Comment(by mvngu):
REFEREE REPORT
[[BR]][[BR]]
The patch '''trac_5465_1.patch''' applies OK against Sage 3.4, all
doctests pass with the {{{-long}}} option as well. Since the purpose of
the patch is to add more meaningful error messages, I tried to get those
two more meaningful messages. First, for the case where the number of
generators is < 3:
{{{
sage: # first for the case of S.ngens() < 3...
sage: R.<x,y> = PolynomialRing(QQ,2)
sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan()
sage: G.render()
For 2-D fan rendering the polynomial ring must have 3 variables (or more,
which are ignored).
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (118, 0))
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call
last)
/home/mvngu/.sage/temp/sage.math.washington.edu/16843/_home_mvngu__sage_init_sage_0.py
in <module>()
/home/mvngu/scratch/sage-3.4/local/lib/python2.5/site-
packages/sage/rings/polynomial/groebner_fan.pyc in render(self, file,
larger, shift, rgbcolor, polyfill, scale_colors)
902 if S.ngens() < 3:
903 print "For 2-D fan rendering the polynomial ring must
have 3 variables (or more, which are ignored)."
--> 904 raise NotImplementedError
905 cmd = 'render'
906 if shift:
NotImplementedError:
}}}
Yep, the error message is certainly now more comprehensible than something
like {{{UnboundLocalError}}} which misses the main point that the number
of generators is not of the required size. Now, for the case where the
number of generators is not 4:
{{{
sage: # second, for the case of S.ngens() != 4...
sage: P.<a,b,c> = PolynomialRing(QQ, 3, order="lex")
sage: sage.rings.ideal.Katsura(P,3).groebner_fan().render3d()
For 3-D fan rendering the polynomial ring must have 4 variables
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call
last)
/home/mvngu/.sage/temp/sage.math.washington.edu/16843/_home_mvngu__sage_init_sage_0.py
in <module>()
/home/mvngu/scratch/sage-3.4/local/lib/python2.5/site-
packages/sage/rings/polynomial/groebner_fan.pyc in render3d(self, verbose)
1070 if S.ngens() != 4:
1071 print "For 3-D fan rendering the polynomial ring must
have 4 variables"
-> 1072 raise NotImplementedError
1073 g_cones = [q.groebner_cone() for q in
self.reduced_groebner_bases()]
1074 g_cones_facets = [q.facets() for q in g_cones]
NotImplementedError:
}}}
Again, I see a {{{NotImplementedError}}} which is certainly more
comprehensible than the error message reported above by William Stein. And
finally, given the correct number of generators, we have a nice Groebner
fan :-) Positive review for the problem that the patch fixes.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5465#comment:4>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---