def decomposition_function(self, tiling: Tiling) -> Tuple[Tiling, Tiling]: """ Return a tuple of tiling. The first one avoids all the pattern in the list while the other contain one of the patterns in the list. """ return tiling.add_obstructions(self.gps), tiling.add_list_requirement( self.gps)
def __call__(self, comb_class: Tiling, **kwargs) -> Iterator[RequirementInsertionStrategy]: if comb_class.dimensions != (1, 1): return for strategy in super().__call__(comb_class): t_with_new_req = comb_class.add_list_requirement(strategy.gps) if (self.max_num_req is None or len(t_with_new_req.requirements) <= self.max_num_req): yield strategy