def __init__(self, *args, **kwargs): grid = Grid(*args, **kwargs) super().__init__(grid, source_ids={0, 3, grid.size * 3}, sink_ids={(len(grid.nodes) - 1) // 2}, space_behind_sink=True)
def __init__(self, *args, **kwargs): grid = Grid(*args, **kwargs) super().__init__(grid, source_ids={(grid.size * (grid.size - 2)) - 2 - 1}, sink_ids={(grid.size * 2) + 2}, space_behind_sink=True)
def __init__(self, *args, **kwargs): grid = Grid(*args, **kwargs) super().__init__(grid, source_ids={0, 2, 4}, sink_ids={len(grid.nodes) - 1}, space_behind_sink=False)
def __init__(self, *args, **kwargs): grid = Grid(*args, **kwargs) node_count = len(grid.nodes) super().__init__(grid, source_ids={(node_count // 2) - (grid.size // 3)}, sink_ids={(node_count // 2) + (grid.size // 3)}, space_behind_sink=False)
def __init__(self, *args, **kwargs): grid = Grid(*args, **kwargs) super().__init__(grid, source_ids={(len(grid.nodes) - 1) // 2 - 1, (len(grid.nodes) - 1) // 2 + 1, (len(grid.nodes) - 1) // 2 + grid.size}, sink_ids={len(grid.nodes) - 1}, space_behind_sink=False)
def __init__(self, *args, **kwargs): grid = Grid(*args, **kwargs) super().__init__( grid, source_ids={(grid.size - 1) // 2, ((len(grid.nodes) - 1) // 2) - (grid.size - 1) // 2, ((len(grid.nodes) - 1) // 2) + (grid.size - 1) // 2, len(grid.nodes) - ((grid.size - 1) // 2) - 1}, sink_ids={(len(grid.nodes) - 1) // 2}, space_behind_sink=True)