#11255: Enhance the e_one_star.Patch class
-----------------------------+----------------------------------------------
Reporter: tjolivet | Owner: sage-combinat
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.7.1
Component: combinatorics | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: Timo Jolivet
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Changes (by tjolivet):
* status: needs_work => needs_review
Old description:
> A few enhancements for the Patch class:
>
> * `remove` method;
> * `__hash__` method;
> * deal more cleanly with construction of new patches (sometimes the same
> Face belonged to different patches, which caused problems with colors,
> for example).
>
> For the patchbot (this info must be put here instead of below):
>
> Apply trac-11255-tj.patch trac-11255-tj-modifs.patch trac_11255_reviewer-
> sl.patch
New description:
A few enhancements for the Patch class:
* `remove` method;
* `__hash__` method;
* deal more cleanly with construction of new patches (sometimes the same
Face belonged to different patches, which caused problems with colors, for
example).
For the patchbot (this info must be put here instead of below):
Apply trac-11255-tj.patch trac-11255-tj-modifs.patch trac_11255_reviewer-
sl.patch trac_11255_modifs2-tj.patch
--
Comment:
Hi,
Four things:
I have solved all the doc problems related to the fact that
{{{Patch.__getitem__}}} doesn't necessarily return the same result from
machine to machine. I would like to keep this convenient method (it is
used in various other methods and I use it personally for some other
tasks). I wrote a WARNING in the doc about this fact.
The {{{plot_tikz}}} doctesting problem related to the non-order of
{{{Patch.__iter__}}} has been solved.
I optimized a little the {{{plot_tikz}}} method, by printing a
{{{\definecolor}}} only when a new color is needed.
Also, I have been more careful about making new Faces when creating new
Patches. It is not enough to create new Faces only when
{{{isinstance(other, Patch)}}} in {{{Patch.__add__}}}: for example, if we
get a list L of faces that belong to a patch P, and then create the patch
Q + L, the faces of L have to be copied, otherwise changing the color of Q
will also change some colors of P. I have solved all instances of this
potential problem.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11255#comment:13>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
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.