#15820: Implement sequences of bounded integers
--------------------------------------------+------------------------
Reporter: SimonKing | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.2
Component: algebra | Resolution:
Keywords: sequence bounded integer | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
--------------------------------------------+------------------------
Comment (by ncohen):
Helloooooo !!
> Why? It should be a replacement for tuples (thus, low-level), but it
should ''ideally'' be (close to) a drop-in replacement (thus, it doesn't
matter whether one uses it by mistake).
Why do you want it to inherit from tuple ? I do not know the effect of
such a thing, what it brings and what should be feared
> Good point. So, you mean that these functions should actually ''not''
create fully-fledged quiver paths, but should just operate on instances of
`BoundedIntegerSequence`, and only in the end interpret them as paths,
when the battle smoke has vanished.
Well, yep. Only create the high-level stuff with possible overhead when
you need it. And you end up knowing exactly what your code does when you
are writing the code of your time-critical function.
> So, perhaps I should really do `cdef class
BoundedIntegerSequence(tuple)` rather than `cdef class
BoundedIntegerSequence(MonoidElement)`.
Hmmm.. I still don't get why you want it to inherit from tuple. My
natural move would be to implement this as a C structure, not even a
object `:-P`
> But then, what to do with all these internally used constants that are
needed even for the low-level functionality of `BoundedIntegerSequence`?
Would you prefer to compute and store these constants 10000 times when
creating 10000 sequences of integers bounded by `B`? Or would you prefer
to compute and store these constants only once, namely in a parent that
hosts all sequences of integers with a fixed bound?
Well, somehow that's already what we do with graph backends. We have a
Generic Backend, extended twice in Dense Graphs and Sparse Graphs. And
all the constants needed by the data structures are stored in the
corresponding files. You could have a `BoundedIntegerSequence` class
implementing no function at all, extended by alld ifferent implementations
of the data structures you want. Even in the same file.
... And we don't need parents for that `:-PPPP`
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/15820#comment:23>
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/groups/opt_out.