#17920: Reimplement IntegerLists using Polyhedron.integral_points()
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.6
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/17920 | 621d467827d8d0c6a0cb1113cb4b861cca936f41
Dependencies: #17937, #18087 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by nthiery):
Replying to [comment:79 jdemeyer]:
> Replying to [comment:78 vdelecroix]:
> > Replying to [comment:77 jdemeyer]:
> > > I would actually like to redesign `IntegerListsLex` and
`IntegerLists_polyhedron` such that they share code: they could be the
same class but with a different implementation for `__iter__` and
`__contains__`.
> >
> > +1
> >
> > why not several iterators on the same class? (with a reasonable one by
default in `__iter__`).
> Well, it will be something along those lines. But I haven't thought too
much about the actual design.
+1 to sharing code between the classes; in fact I had put a mental
note on doing this when I offered to do the merge :-)
Having a class that can handle any set of constraints, even if it does
only containment check, would be useful. We would need this in
particular to properly refactor integer vectors.
I am not sure whether we want a single class, or two classes:
{{{
class IntegerLists:
__iter__ -> __iter__ on the polyhedron
class IntegerListsLex(IntegerLists):
}}}
With the second one having the additional specification that the
enumeration shall be lexicographic.
Thoughts?
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/ticket/17920#comment:81>
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.