tusc.posets.example_posets¶
- class posets.example_posets.ExamplePosets¶
Methods
Generates a coverage_list for the Boolean lattice B_n.
finite_chain(length)Generates a finite chain of specified length.
- boolean_lattice(n)¶
Generates a coverage_list for the Boolean lattice B_n.
- Parameters
n (int) – value of n specifying B_n
- Returns
coverage_list (list) – list of coverage statements defining the poset
Example Usage
————-
>>> coverage = example_posets.ExamplePosets().boolean_lattice(4)
{‘_’ ([‘1’, ‘2’, ‘3’, ‘4’], ‘1’: [‘12’, ‘13’, ‘14’],)
’2’ ([‘12’, ‘23’, ‘24’], ‘3’: [‘13’, ‘23’, ‘34’],)
’4’ ([‘14’, ‘24’, ‘34’], ‘12’: [‘123’, ‘124’], ‘13’: [‘123’, ‘134’],)
’14’ ([‘124’, ‘134’], ‘23’: [‘123’, ‘234’], ‘24’: [‘124’, ‘234’],)
’34’ ([‘134’, ‘234’], ‘123’: [‘1234’], ‘124’: [‘1234’], ‘134’: [‘1234’],)
’234’ ([‘1234’]})
- finite_chain(length)¶
Generates a finite chain of specified length.
- Parameters
length (int) – number of items you want in the chain
- Returns
~ output ~ – list of coverage statements defining the poset
- Return type
list