#15820: Implement sequences of bounded integers
-------------------------------------+-------------------------------------
       Reporter:  SimonKing          |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  algebra            |   Resolution:
       Keywords:  sequence bounded   |    Merged in:
  integer                            |    Reviewers:  Jeroen Demeyer, Simon
        Authors:  Simon King,        |  King
  Jeroen Demeyer                     |  Work issues:  interrupt handling
Report Upstream:  N/A                |       Commit:
         Branch:                     |  0a03d71d9df26c42cf91dab3df51ca549c434718
  u/jdemeyer/ticket/15820            |     Stopgaps:
   Dependencies:  #17195, #17196     |
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 Replying to [comment:354 SimonKing]:
 > What do you think about switching back to the old rĂ´le of the arguments
 I think it's a bad idea.

 Look at the following (now removed) code from you:
 {{{
 if other.startswith(self):
     return self
 cdef mp_size_t i = biseq_max_overlap(self.data, other.data)
 }}}
 Note that the case `i == 0` of `biseq_max_overlap(B, A)` corresponds to
 `biseq_startswith(A, B)`. An unexpected reordering in my opinion.

 In my proposal, the three functions `biseq_startswith`, `biseq_contains`
 and `biseq_reverse_contains` (whatever the name) all check whether some
 part of `S1` starts with some part of `S2`. The only thing that changes is
 which parts of `S1` and `S2` are considered.

--
Ticket URL: <http://trac.sagemath.org/ticket/15820#comment:364>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to