itacart.topology.cells_to_directed_edge

itacart.topology.cells_to_directed_edge(origin, destination)[source]

Identifier of the directed edge between two adjacent cells.

Validates edge adjacency first. Origins and destinations are paired by position, so N origins and N destinations give N edges; broadcast a single origin by repeating it.

Parameters:
  • origin (str) – Compositional index of the origin cell or cells.

  • destination (str) – Compositional index of the destination cell or cells.

Return type:

str | list[str]

Returns:

An edge identifier for a single pair, or a positionally aligned list.

Raises:
  • DomainError – If the two indices hold different cell counts, or if any pair is not edge-adjacent.

  • NonExistentCellError – If any cell of the index names no cell. The predicate is the arbiter and the contract ends there: a spelling it denies is refused rather than answered for the cell it would otherwise fold onto.