alhambra.nuad#

Module Contents#

Functions#

load_nuad_design(→ alhambra.tilesets.TileSet)

update_nuad_design(→ nuad.constraints.Design)

From an Alhambra tileset and an existing Nuad Design. IN-PLACE

tileset_to_nuad_design(→ nuad.constraints.Design)

From an Alhambra tileset, generate a Nuad Design with all of its domains.

group_strand_pairs_by_groups_and_complementary_domains(...)

Group pairs of strands by their groups (sorted) and number of complementary domains.

Attributes#

log

alhambra.nuad.log[source]#
alhambra.nuad.load_nuad_design(tileset: alhambra.tilesets.TileSet, design: nuad.constraints.Design, update_tiles: bool = True, inplace: bool = False) alhambra.tilesets.TileSet[source]#
alhambra.nuad.update_nuad_design(tileset: alhambra.tilesets.TileSet, old_design: nuad.constraints.Design, groups: Literal[structure] | Mapping[str, str] | Callable[[alhambra.tiles.Tile], str] = 'structure') nuad.constraints.Design[source]#

From an Alhambra tileset and an existing Nuad Design. IN-PLACE

alhambra.nuad.tileset_to_nuad_design(tileset: alhambra.tilesets.TileSet, groups: Literal[structure] | Mapping[str, str] | Callable[[alhambra.tiles.Tile], str] = 'structure') nuad.constraints.Design[source]#

From an Alhambra tileset, generate a Nuad Design with all of its domains.

groups:

Methods for setting the group of each strand.

alhambra.nuad.group_strand_pairs_by_groups_and_complementary_domains(design: nuad.constraints.Design, strands: Iterable[nc.Strand] | None | None = None) Dict[Tuple[str, str, int], list[Tuple[nc.Strand, nc.Strand]]][source]#

Group pairs of strands by their groups (sorted) and number of complementary domains.