Opened 10 years ago

Closed 10 years ago

#10267 closed enhancement (fixed)

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

Reported by: slabbe Owned by: slabbe
Priority: major Milestone: sage-4.6.2
Component: combinatorics Keywords:
Cc: abmasse Merged in: sage-4.6.2.alpha0
Authors: Sébastien Labbé Reviewers: Alexandre Blondin Massé
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


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)
sage: w.is_balanced(3)
sage: w.is_balanced(4)
sage: w.is_balanced(5)
sage: w.balance()

Attachments (1)

trac_10267-balance-sl.patch (3.6 KB) - added by slabbe 10 years ago.
Applies over sage-4.6

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by slabbe

Applies over sage-4.6

comment:1 Changed 10 years ago by slabbe

  • Authors set to Sébastien Labbé
  • Cc abmasse added
  • Status changed from new to needs_review

Needs review!

comment:2 Changed 10 years ago by abmasse

  • Reviewers set to Alexandre Blondin Massé
  • Status changed from needs_review to positive_review

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.

comment:3 Changed 10 years ago by jdemeyer

  • Milestone changed from sage-4.6.1 to sage-4.6.2

comment:4 Changed 10 years ago by jdemeyer

  • Merged in set to sage-4.6.2.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.