#8288: Depth/Breadth improvement for SearchForest
-----------------------------------------------+----------------------------
   Reporter:  nborie                           |       Owner:  sage-combinat    
                        
       Type:  enhancement                      |      Status:  needs_work       
                        
   Priority:  major                            |   Milestone:  sage-4.4.3       
                        
  Component:  combinatorics                    |    Keywords:  enumeration 
depth breadth forest children
     Author:  Nicolas Borie                    |    Upstream:  N/A              
                        
   Reviewer:  Florent Hivert, Minh Van Nguyen  |      Merged:                   
                        
Work_issues:                                   |  
-----------------------------------------------+----------------------------

Comment(by hivert):

 Hi Nicolas,

 I'm currently using search forest and I run into some troubles... I also
 want
 to suggest some improvements in the code:

  - please define method {{{_repr_}}} (Sage way) rather than {{{__repr__}}}
    (Python's way).

  - when you need to link a class in the same file you don't have to give
 the
    full path for exampe {{{:class:`SearchForest`}}} is sufficient compared
 to
    {{{:class:`~sage.combinat.backtrack.SearchForest`}}}

  - please make sure and '''document''' that a common intended use of
    {{{SearchForest}}} is to inherit from it, calling only
    {{{Parent.__init__}}} and overload the methods
    {{{roots, children, post_process}}} rather than passing them to the
 constructors.
    Please make sure to specify their result type (iterable vs. iterator).
    By the way, should'nt those methods be private methods (eg:
 {{{_roots}}}
    vs. {{{roots}}}. I don't expect the user to call them in my use-case.

 Thanks for all this ! I'm using it...

 Florent

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