| 1 | initial version |
It is not usual to bundle a database of combinatorial objects coming with Sage by default.
It would be nice to have a (fast) enumerated set of all lattices on a given number of elements. Although my impression is that the set of lattices on a given number of vertices is not easy to generate recursively. Indeed, the lattice property of a poset does not behave well with respect to inclusion, so a recursive enumeration would not work as smoothly as it does for posets.
That said, depending on what you want to do, you could use an iterator:
n_elmt=7
connected_lattice_iterator = (p for p in Posets(n_elmt) if p.is_connected() and p.is_lattice())
to generate all connected lattices one by one.
| 2 | No.2 Revision |
It is not usual to bundle a database of combinatorial objects coming with Sage by default.
It would be nice to have a (fast) enumerated set of all lattices on a given number of elements. Although my impression is that the set of lattices on a given number of vertices is not easy to generate recursively. Indeed, the lattice property of a poset does not behave well with respect to inclusion, so a recursive enumeration would not work as smoothly as it does for posets.
That said, depending on what you want to do, you could use an iterator:
n_elmt=7
n_elmt = 7
connected_lattice_iterator = (p for p in Posets(n_elmt) if p.is_connected() and p.is_lattice())
to generate all connected lattices one by one.
| 3 | No.3 Revision |
It is not usual to bundle a database of combinatorial objects coming with Sage by default.
It would be nice to have a (fast) enumerated set of all lattices on a given number of elements. Although my impression is that the set of lattices on a given number of vertices is not easy to generate recursively. Indeed, the lattice property of a poset does not behave well with respect to inclusion, so a recursive enumeration would not work as smoothly as it does for posets.
That said, depending on what you want to do, you could use an iterator:
n_elmt = 7
connected_lattice_iterator = (p for p in Posets(n_elmt) if p.is_connected() and p.is_lattice())
to generate all connected lattices one by one.one, but it does not increase the speed of generation...
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.