Skip to content

bloqade.geometry.dialects.filled.vacate

← Module overview

functionvacatesource

bloqade.geometry.dialects.filled.vacate

Signature
def vacate(zone: grid.Grid[Nx, Ny], vacancies: ilist.IList[tuple[int, int], Any] | list[tuple[int, int]]) -> FilledGrid[Nx, Ny]

Create a FilledGrid by vacating specified positions from a grid.

Parameters

NameTypeDescription
zonegrid.Grid[Nx, Ny]The original grid from which positions will be vacated.
vacanciesilist.IList[tuple[int, int], Any] | list[tuple[int, int]]An IList or list of (x_index, y_index) tuples indicating positions to vacate

Returns

FilledGrid[Nx, Ny]A FilledGrid with the specified vacancies.

source