[sage-devel] Re: Generating posets, lattices etc. up to isomorphism

2015-06-14 Thread Nathann Cohen
> > Would this be good interface: > > Posets_iterator(n, properties=None, width=None, height=None) > Do you have a specific reason for creating a class Posets_iterator? Or would a simple function do the job? Whatever you chose, it should probably be made available as an element of posets.. F

Re: [sage-devel] Re: Generating posets, lattices etc. up to isomorphism

2015-06-14 Thread Viviane Pons
Hi Jori, when I want to iterate through posets, I do this: sage: P3 = Posets(3); P3 Posets containing 3 vertices sage: list(P3) [Finite poset containing 3 elements, Finite poset containing 3 elements, Finite poset containing 3 elements, Finite poset containing 3 elements, Finite poset contain

Re: [sage-devel] Re: Generating posets, lattices etc. up to isomorphism

2015-06-15 Thread Jori Mäntysalo
On Sun, 14 Jun 2015, Viviane Pons wrote: From a user point of view, it would seem natural to have something like sage: Posets(3,  ... some options ...) Posets containing 3 vertices with ... some options ... which could indeed return a new class ``FinitePosets_n_with_properties`` in the model o

Re: [sage-devel] Re: Generating posets, lattices etc. up to isomorphism

2015-06-19 Thread Jori Mäntysalo
On Sun, 14 Jun 2015, Nathann Cohen wrote: something like the following to work, you will have to mess with this category (or replace it by another object) sage: for p in Posets(max_width=3,max_height=4,num_points=90): :     I think that this can be done. But what about Poset({0:[1]}) in