#15673: major improvements to lazy power series
-------------------------------------+-------------------------------------
Reporter: mhansen | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: combinatorics | Resolution:
Keywords: LazyPowerSeries,, | Merged in:
days57 | Reviewers: Ralf Stephan,
Authors: Mike Hansen | Matthieu Dien
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/ticket/15673 | 5478a2de727c686fd1d892ea8186d54b8d839daa
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by mantepse):
I looked again at the code by Mike Hansen, I believe I understand it a
little bit better than 2 years ago. I try to give a summary, and hope to
get some feedback.
The code in this ticket consists of three parts: streams (with similar
intentions to {{{lazy_list}}}), power series, and the adaptation of the
species code.
The code for streams (only roughly 500 lines) is in {{{new_stream.py}}}.
It introduces different classes depending on how the stream is to be
produced: {{{StreamFromIterator}}}, {{{StreamFromList}}},
{{{StreamFromFunction}}} (unused), and an "abstract base class"
{{{ListCachedStream}}}.
The code for series is mainly in {{{series_stream.py}}} and
{{{series.py}}}. The main class is {{{SeriesStream}}} (which is a
misnomer, I'd say). Its main purpose is to set up the protocol that
enables recursive definitions, by keeping track of the so called
approximate order of a series, which is a lower bound on the exponent of
the monomials in the series with non-vanishing coefficient.
For each operation on series (binary, like addition, multiplication,
composition; unary, like derivative, etc.) introduces a new class, where
the above mentioned order and the actual terms are computed.
Finally, the classes {{{LazyPowerSeriesRing}}} and {{{LazyPowerSeries}}}
in {{{series.py}}} put this into the algebraic framework.
There are many things I do not completely understand. For example, for
the species code yet another class, {{{SpeciesSeriesStream}}}, is
introduced, rather than just using {{{LazyPowerSeries}}}. I have no idea
why this is so complicated. (It wasn't complicated in the original aldor
code, and it's somehow hard to believe that python would need so much more
code.)
Assuming that the code is OK I guess it's best if I rebase it and see what
happens.
--
Ticket URL: <http://trac.sagemath.org/ticket/15673#comment:40>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.