Modules — Ryser 0.0.10 documentation

### Navigation

- index
- modules |
- previous |
- Ryser 0.0.10 documentation »

# Modules

## Designs

## Graphs

`graphs.` `aram`(P, r, t, e)

  The augmented row-absences multigraph of a KF-SPLS.

`graphs.` `latin_graph`(size)

  The cartesian product of the complete graph with ‘size’ vertices with itself.

`graphs.` `rabg`(P, r, t, e)

  The row-absences bipartite-graph of a KF-SPLS.

`graphs.` `symmetric_latin_graph`(size)

  The graph described on p.20 of “Completing Partial Latin Squares: Cropper’s Question”

  > by Bobga, Goldwasser, Hilton and Johnson.

## Hall

`hall.` `inequality_on_cells`(partial_latin_square, cells)

  Decide whether Hall’s condition is satisfied for cells.

`hall.` `inequality_on_cells_g`(graph, lists, size, cells)

  Decide if Hall’s condition is satisfied for the subgraph of the latin graph induced by vertices in ‘cells’ and list assignment given by ‘lists’.

`hall.` `numbers`(partial_latin_square, cells)

  Returns a list of Hall numbers for the subgraph induced by cells in cells.

`hall.` `subgraphs`(partial_latin_square, cells, with_labels=False, format='png')

  Draw symmetric Hall subgraphs.

`hall.` `symmetric_inequality_on_cells`(partial_latin_square, cells)

  Decide whether Hall’s condition is satisfied for cells in symmetric case.

`hall.` `symmetric_numbers`(partial_latin_square, cells)

  Returns a list of Hall numbers for the subgraph induced by cells in cells.

## Output

`output.` `dict_to_string`(fixed, size, col_sep='', row_sep='', padding=0, top='', bottom='')

  Returns a puzzle string of dimension ‘boxsize’ from a dictionary of ‘fixed’ cells.

  padding : number of spaces between adjacent symbols row_end : a string added to the last symbol of every row col_sep : a string added to the last symbol of every column

`output.` `row_string`(fixed, size, row, col_sep='|', padding=0)

  Converts a dict of fixed cells to a string.

  fixed - a cell-symbol dictionary size - the dimension of the PLS row - the row to convert to a string col_sep - a string used as a separator between columns padding - number of spaces either side of a symbol

## Utils

`utils.` `cell`(row, column, size)

  The label of the cell in position (row, col).

`utils.` `col`(cell, size)

  The column label of the column in a square of dimension ‘size’ containing the cell with label ‘cell’.

`utils.` `col_r`(cell, size)

  A range of all labels of cells in the same column as ‘cell’.

`utils.` `list_assignment`(partial_latin_square, size)

  The (canonical) list assignment for a partial latin square. The list of a filled cell is the list containing just the element in that cell. The list of an empty cell contains only those symbols not already used in the same row and column as that cell.

`utils.` `rect_r`(tl, br, size)

  A rectangular range which extends from tl in the top-left to br in the bottom right.

`utils.` `row`(cell, size)

  The row label of the row in a square of dimension ‘size’ containing the cell with label ‘cell’.

`utils.` `row_r`(cell, size)

  A range of all labels of cells in the same row as ‘cell’.

`utils.` `vertex`(cell, size)

  The row and column labels of ‘cell’, as a pair.

### Navigation

- index
- modules |
- previous |
- Ryser 0.0.10 documentation »