#7642: Add an implementation of LCA to sage.combinat.words.suffix_trees
-----------------------------+----------------------------------------------
   Reporter:  abergeron      |       Owner:  sage-combinat  
       Type:  enhancement    |      Status:  needs_review   
   Priority:  major          |   Milestone:                 
  Component:  combinatorics  |    Keywords:  lca suffix_tree
     Author:                 |    Upstream:  N/A            
   Reviewer:                 |      Merged:                 
Work_issues:                 |  
-----------------------------+----------------------------------------------

Comment(by ncohen):

 Several comments about this patch :

  * leftmost_one naturally fails on 0, as it computes a logarithm...
 Shouldn't this be documented, or the exception handled inside the
 function, to return something like -1 ?

  * bits_left_of seems to me a bit vague for what the function does... What
 would you think of leftmost_bits ? The docstring could be more explicit,
 like : substracts from x the leftmost i bits in its "base-2 expression" (I
 do not know how this is said in english) :-)
    Same remark for bits_right_of

  * I have no idea of what a MSB is, and could find its definition nowhere.
 Could you at least write its full name ? ( samek remark for lca, which
 appears very often in the docstrings )

  * I think you should define _ldata inside of the __init__ function

  * I am not a big fan of your algorithm = best argument in LCA. The user
 is bound to know if the tree has been preprocessed, as he has to call it
 himself. I think it is just a sourc e of silent failures to use the "fast"
 algorithm.

 What you are doing in this patch is out of my field, so my remarks could
 just come from this. I thought it would just be an algorithm on trees, but
 many details not being explicit in the docstrings, it is difficult for me
 to fill the holes... :-)

 Nathann

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