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

Add a method that returns the balance level of a finite word #10267

Closed
seblabbe opened this issue Nov 14, 2010 · 6 comments
Closed

Add a method that returns the balance level of a finite word #10267

seblabbe opened this issue Nov 14, 2010 · 6 comments

Comments

@seblabbe
Copy link
Contributor

Add method for finite word that returns the balance of self.

The balance of a word is the smallest number q such that self is q-balanced.

sage: w = Word('11112222')
sage: w.is_balanced(2)
False
sage: w.is_balanced(3)
False
sage: w.is_balanced(4)
True
sage: w.is_balanced(5)
True
sage: w.balance()
4

CC: @sagetrac-abmasse

Component: combinatorics

Author: Sébastien Labbé

Reviewer: Alexandre Blondin Massé

Merged: sage-4.6.2.alpha0

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

@seblabbe seblabbe added this to the sage-4.6.1 milestone Nov 14, 2010
@seblabbe seblabbe self-assigned this Nov 14, 2010
@seblabbe
Copy link
Contributor Author

Attachment: trac_10267-balance-sl.patch.gz

Applies over sage-4.6

@seblabbe
Copy link
Contributor Author

comment:1

Needs review!

@seblabbe
Copy link
Contributor Author

Author: Sébastien Labbé

@sagetrac-abmasse
Copy link
Mannequin

sagetrac-abmasse mannequin commented Nov 15, 2010

Reviewer: Alexandre Blondin Massé

@sagetrac-abmasse
Copy link
Mannequin

sagetrac-abmasse mannequin commented Nov 15, 2010

comment:2

I just finished testing the ticket... Short and sweet, there's nothing to say. All tests passed, Sphinx generated clean documentation, the code is easy to understand, the name is clear and the references are sound. Positive review.

@jdemeyer
Copy link

Merged: sage-4.6.2.alpha0

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

2 participants