Skip to content
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

iterated_right_palindromic_closure of a finite word should return a finite word #8186

Closed
seblabbe opened this issue Feb 5, 2010 · 13 comments

Comments

@seblabbe
Copy link
Contributor

seblabbe commented Feb 5, 2010

Le 5 février 2010 00:33, Alexandre Blondin Massé a écrit :
> Salut, Seb !
> C'est bizarre, j'obtiens ceci dans Sage:
>
> sage: w = Word('abaabababababab')
> sage: u = w.iterated_right_palindromic_closure()
> sage: print u.length()
> None
> sage: len(u)
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call last)
>
> /Users/alexandre/<ipython console> in <module>()
>
> TypeError: an integer is required
> sage:
>
> J'imagine que c'est dû au fait que c'est un mot implémenté par un itérateur
> avec cache, mais ce n'est pas très pratique, on devrait pouvoir savoir la
> longueur d'un tel mot. Y a-t-il moyen de le faire ? Peut-on forcer
> l'évaluation ? Merci !
> Alex

CC: @sagetrac-abmasse

Component: combinatorics

Author: Sébastien Labbé

Reviewer: Alexandre Blondin Massé

Merged: sage-4.3.3.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/8186

@seblabbe
Copy link
Contributor Author

seblabbe commented Feb 5, 2010

comment:1

I just attached a patch which fixes the problem for the mentioned function, but also for some others having the same problem.

It also adds a function that gives the longest periodic prefixes of a word which should not be harder to review.

@sagetrac-abmasse
Copy link
Mannequin

sagetrac-abmasse mannequin commented Feb 5, 2010

Attachment: trac_8186_length_handling-sl.patch.gz

Attachment: trac_8186_minor_doc_changes-abm.patch.gz

Very minor changes in the doc (typos and rephrasing)

@sagetrac-abmasse
Copy link
Mannequin

sagetrac-abmasse mannequin commented Feb 5, 2010

comment:2

Tested the patch on sage 4.3.1. Everything builds fine, the doc generated by Sphinx is ok too. I made very minor modifications, only typos and rephrasing. Positive review if Sébastien agrees with my changes.

@sagetrac-abmasse
Copy link
Mannequin

sagetrac-abmasse mannequin commented Feb 5, 2010

Reviewer: Alexandre Blondin Massé

@sagetrac-abmasse
Copy link
Mannequin

sagetrac-abmasse mannequin commented Feb 5, 2010

Author: Sébastien Labbé

@sagetrac-abmasse
Copy link
Mannequin

sagetrac-abmasse mannequin commented Feb 5, 2010

comment:3

Forgot to set the author and reviewer fields. Done.

@sagetrac-abmasse
Copy link
Mannequin

sagetrac-abmasse mannequin commented Feb 5, 2010

comment:4

I forgot to mention that it solved my initial problem as well.

@seblabbe
Copy link
Contributor Author

seblabbe commented Feb 5, 2010

comment:5

Thanks for the doc fixes. I agree with them.

@qed777
Copy link
Mannequin

qed777 mannequin commented Feb 10, 2010

comment:6

For the record, the "length handling" patch applies to 4.3.2 with

applying trac_8186_length_handling-sl.patch
patching file sage/combinat/words/word.py
Hunk #2 succeeded at 1109 with fuzz 2 (offset 0 lines).

in the queue

trac_8219.patch
trac_3683-upgrade_moinmoin.patch
trac_8183-French_pdf.patch
trac_8190-docbuild.patch
trac_8184-eclib.patch
trac_8184-indentation.patch
trac_8155.patch
trac_8124-selmer-nf.review.patch
trac_7575.patch
trac_7575-followup.patch
trac_8189-hg.patch
trac_7935.patch
trac_7935b.2.patch
trac_6296.patch
trac_6296-part2.patch
trac6942_jordan.patch
trac6942_jordan_tests.patch
trac_6942-reviewer.patch
trac_8128-latex_cell_unicode.patch
trac_7313-multiline.patch
trac_8203-doc.patch
trac_8206_developer-doc.patch
trac_7944-dev-guide.patch
trac-8211.patch
trac_8044-categories_finite_groups-nt.patch
trac_8215_empty_word-sl.patch
trac_8186_length_handling-sl.patch               # You are here!
trac_8186_minor_doc_changes-abm.patch
trac_8140-sturmian-sl.patch
trac_8140-doc_fixes-abm.patch
trac_8140_cf-arg-sl.patch
trac_8093_palindromes_prefixes-abm.patch
trac_8093_doc_fixes-sl.patch
trac_7978_crystal_cleanup-as.2.patch
trac_6775-disjoint_set-sl.patch
7580_fixes_and_extensions_total.patch
trac_8120-uniquerep_hash-fh.patch
trac_8212-minimal_weight_poly_defining_GF2n.patch
6199-fast-int-mul-all.patch
trac_8188.patch
trac_8138-one_column_index-v2.patch
trac_8209-mathtt.3.patch
trac_8199-dev-guide.patch
trac_7947.patch
trac_7793-zorder-disk.patch
trac_4838-vd.patch
trac_8082.patch
trac-8004-region_plot.patch
trac_6878_exclude.patch
8185-numerical-noise.patch
trac_8180-kpsewhich.patch
6515-solve-assume.patch
trac_6515-referee.patch
trac-7334-logcontract-5.patch
trac-7334-logcontract-5-bugfix.patch
trac_7334-logcontract-5-reviewer.patch

@qed777
Copy link
Mannequin

qed777 mannequin commented Feb 10, 2010

comment:7

Never mind. I switched the order of #8186 and #8093.

@seblabbe
Copy link
Contributor Author

comment:8

Replying to @qed777:

Never mind. I switched the order of #8186 and #8093

Here is the ordering of the current positive review patches in the sage-combinat tree, if it may help your job, I just tested them and they all apply without warning fuzz message :

sage-4.3.3.patch
trac_8223-fix_dir-nt.patch
trac_8044-categories_finite_groups-nt.patch
trac_8093_palindromes_prefixes-abm.patch
trac_8093_doc_fixes-sl.patch
trac_8140-sturmian-sl.patch
trac_8140-doc_fixes-abm.patch
trac_8140_cf-arg-sl.patch
trac_6775-disjoint_set-sl.patch
trac_8186_length_handling-sl.patch
trac_8186_minor_doc_changes-abm.patch
trac_8120-uniquerep_hash-fh.patch
trac_7978_crystal_cleanup-as.patch
trac_8215_empty_word-sl.patch
trac_8127-word_str_features-vd.patch
trac_8127-review-sl.patch
trac_8232_word_cmp_bug-sl.patch

@seblabbe
Copy link
Contributor Author

comment:9

the patch

trac_8127-word_str_features-vd.patch

correspond to trac_8127.patch on the trac server.

@qed777
Copy link
Mannequin

qed777 mannequin commented Feb 11, 2010

Merged: sage-4.3.3.alpha0

@qed777 qed777 mannequin removed the s: positive review label Feb 11, 2010
@qed777 qed777 mannequin closed this as completed Feb 11, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant