#17979: Reimplementation of IntegerListsLex
-------------------------------------+-------------------------------------
Reporter: aschilling | Owner:
Type: defect | Status: needs_work
Priority: blocker | Milestone: sage-6.6
Component: combinatorics | Resolution:
Keywords: days64 | Merged in:
Authors: Bryan Gillespie, | Reviewers:
Anne Schilling, Nicolas M. Thiery | Work issues: support n in an
Report Upstream: N/A | iterable
Branch: | Commit:
public/ticket/17979 | cb18ced22db714063e744bb907a035b4fe3afa24
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by bgillespie):
Replying to [comment:56 jdemeyer]:
> This limitation should be mentioned somewhere in the docs:
> {{{
> sage: IntegerListsLex(length=2, max_n=Infinity, ceiling=[Infinity, 0],
floor=[0,1]).list()
> Traceback (most recent call last):
> ...
> ValueError: infinite upper bound for values of m
> }}}
> (this is another example which "just works" with #17920).
I have plans to implement some parameter adjustments and cardinality
checking for the cases when a user doesn't specify a custom floor or
ceiling function which would catch this issue. Currently the code doesn't
do any extra handling on cases where the floor and ceiling functions
intersect, so currently it tries to find the largest possible value for
the first position in the list, and determines that there is no largest
one. The new checks would also make use of the slope conditions to catch
something like:
{{{
sage: IntegerListsLex(length=3, max_n=Infinity, max_slope=1,
ceiling=[Infinity, 1, 3], floor=[0, 1, 3])
}}}
For the moment, it does raise an error in this kind of situation, but it
also doesn't hang or return an incorrect result. It also might be useful
to give a more descriptive error message for when the possible values in a
position are unbounded.
--
Ticket URL: <http://trac.sagemath.org/ticket/17979#comment:73>
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.