#16137: lazy_list from various input data
-------------------------------------+-------------------------------------
       Reporter:  MatthieuDien       |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.4
      Component:  misc               |   Resolution:
       Keywords:  LazyPowerSeries,   |    Merged in:
  lazy_list, days57                  |    Reviewers:
        Authors:  Vincent            |  Work issues:
  Delecroix, Matthieu Dien           |       Commit:
Report Upstream:  N/A                |  37e67683e7a2f10152ba3a01b8aed508fe92f0f1
         Branch:                     |     Stopgaps:
  u/MatthieuDien/lazy_list_from_various_input_data|
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by vdelecroix):

 Hello,

 Cool. Thanks Matthieu!

 1) Please use complete names `lazy_list_from_function` and not
 abreviations. (see also item 3 of Martin)

 2) For your specifications, I really do not think it is the best way to
 do. Very often you have functions that update *many* values at a time
 (think about Newton method, or substitutively defined sequences). I would
 prefer much more `lazy_list_from_function` whose argument would be a
 function `f(computed_values)` and which would update the list
 `computed_values` with one iteration of the algorithm (and return nothing
 or possibly an error code). And it has no sense to send the size of the
 cache to that function (since it is a list and a list knows its length).

 3) I think we need more classes (I am not convinced by all names). Some of
 them might be implemented in further tickets
 {{{
 lazy_list: abstract class
  |
  +-- lazy_list_periodic: ultimately periodic lazy list (attributes=two
 lists)
  |
  +-- lazy_list_explicit: (attribute=function n-> u_n)
  |
  +-- lazy_list_concatenation: a concatenation of a finite liste and a lazy
 list
  |
  +-- lazy_list_slice: a slice of another lazy list
  |
  +-- lazy_list_with_cache: a cache management
       |
       +-- lazy_list_from_iterator: the old lazy_list
       |
       +-- lazy_list_from_function: update function (basically what you
 did)
 }}}

 4) we need a unique entry point for all these classes which must be of
 course `lazy_list`.

 5) In the old implementation `lazy_list` were immutable. It has the
 advantage of having shared slices. On the other hand it is annoying
 because they are immutable and hence it will be forbidden to have
 operations like "f += 1" without a (light) copy.

 Vincent

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