#5038: [with patch, needs work] Add support for word path
-----------------------------+----------------------------------------------
   Reporter:  slabbe         |       Owner:  slabbe         
       Type:  enhancement    |      Status:  needs_work     
   Priority:  major          |   Milestone:  sage-combinat  
  Component:  combinatorics  |    Keywords:                 
Work_issues:                 |      Author:  Sebastien Labbe
   Reviewer:  Mike Hansen    |      Merged:                 
-----------------------------+----------------------------------------------
Changes (by slabbe):

  * status:  needs_review => needs_work


Comment:

 I am reviewing my own patch... There is something I dislike in the patch
 that I would like to discuss before including it into Sage. There are pros
 and cons for having a word path being a word. One thing I dislike right
 now is the pollution on the tab completion :

 {{{
 sage: P = WordPaths('abcd')
 sage: p = P('aaaaa')
 sage: p.
 Display all 146 possibilities? (y or n)
 }}}

 whereas it could be something like below if a word path wouldn't inherit
 from {{{FiniteWord}}} (but still from {{{WordDatatype}}} :

 {{{
 sage: P = WordPaths('abcd')
 sage: p = P('abbbbccd')
 sage: p.
 p.animate           p.find              p.points
 p.area              p.has_prefix        p.rename
 p.category          p.has_suffix        p.reset_name
 p.count             p.is_closed         p.rfind
 p.db                p.is_prefix         p.save
 p.directive_vector  p.is_simple         p.start_point
 p.dump              p.is_suffix         p.tikz_trajectory
 p.dumps             p.length            p.version
 p.end_point         p.plot
 }}}

 But since I still want to know if a wordpath is a palindrome and other
 questions already implemented for words, something like below could exist
 :

 {{{
 sage: P = WordPaths('abcd')
 sage: p = P('abbbbccd')
 sage: p.to_word()
 sage: p.
 Display all 146 possibilities? (y or n)
 sage: p.is_palindrome()
 False
 }}}

 Of course I would want the {{{to_word}}} to be constant time (no copy) : I
 am thinking of simply adding the {{{FiniteWord}}} class to the base
 classes of {{{p}}}.


 Franco, Mike Hansen : Do you have any comments ? I am sure you have useful
 ideas I could use!

 Thank you,

 Sébastien

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5038#comment:12>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to