-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
improve equality tests for words #8187
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Changed keywords from none to words |
Work Issues: equality |
comment:4
This patch seems to introduce some problems. See http://groups.google.com/group/sage-combinat-devel/browse_thread/thread/9e90bbeb0328034c Needs work... |
This comment has been minimized.
This comment has been minimized.
Attachment: trac_8187_equality_words-sl.patch.gz |
comment:6
Finally, the problem were already present. This ticket was simply making them appear! The problem is being tracked at #8232. I just uploaded a new patch. Needs review again! |
comment:7
I tested the patch and everything seems fine. Although it modifies several basic functions, it doesn't seem to have any side effect. I couldn't check all documentation since some part of the code is written in Cython, but the functions I did check built correctly. I've made minor changes in the doc: just formatting some part of the code or correcting typos. If Sébastien agrees with my change, I allow him to set the path to |
Doc, formatting and typos changes -- apply on top of the main patch |
comment:8
Attachment: trac_8187_review-abm.patch.gz I forgot to mention that equality tests are indeed improved in some cases, and I haven't encountered any worse case, which is good ! |
Author: Sébastien Labbé |
Reviewer: Alexandre Blondin Massé |
Merged: sage-4.3.4.alpha0 |
comment:11
Merged in this order: |
More often, when we compare two words, we test their equality and not that one is less than the other. So why not implement the equatlity test!? This ticket does this for datatypes and for math objects.
WordDatatype_str
,WordDatatype_list
andWordDatatype_tuple
(via__richcmp__
) usefull when comparing two words represented by the same kind of data. It is now as fast as the python object :__eq__
and__ne__
forWord_class
because it is faster than using__cmp__
(especially when parent alphabet are defined). These functions are used to test the equality of two words represented by different python objects (datatypes).no parents :
with parents (!!):
CC: @sagetrac-abmasse @videlec @saliola
Component: combinatorics
Keywords: words
Work Issues: equality
Author: Sébastien Labbé
Reviewer: Alexandre Blondin Massé
Merged: sage-4.3.4.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/8187
The text was updated successfully, but these errors were encountered: