On Oct 30, 9:44 am, "Mike Hansen" <[EMAIL PROTECTED]> wrote:
> One of the main features that I need is the ability to handle
> recursively/implicitly defined power series.  This is currently not
> possible in your code base because the series aren't "lazy enough".

Yes thats true. Currently if I need cached recursion (and I need it in
the code),
I do

s = PS() #uninitialized powerseries
def f(n):
  #fibonacci example
  if n==0 or n==1:
    return 1
  #do something with previous values
  else:
    return s[n-1] + s[n-2]

and afterwards I set the coefficients:

s.f = f

maybe this is more comfortable with Streams, I dont know.

> Specifically, in the constructor for your power series, you compute
> coefficients and set the _val attribute.

But thats pure luxury, its not really necessary.

> I've looked over all of your code and would be willing to port over
> all of the features not currently in Sage next Tuesday.

Ok, then I agree (though thats not the lazy approach ;) )

Some notes:
1. sexp should not belong to the powerseries package
2. it_matrixpower and it_mp is experimental and dont need to be ported
3. For each powerseries I additionally cached its powers (s**n), this
saves a lot of computing time in composition and iteration.

What about lazy Laurent series?
What about moving from combinat to rings?

Henryk
--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to