def contains(self, x): if isinstance(x, Polytope): return not cdd.pempty(cdd.pinters(self, x)) elif isinstance(x, np.ndarray): return not cdd.pempty( cdd.pinters(self, Polytope([np.insert(x, 0, 1)], False))) else: raise Exception("Not implemented")
def inters(*args): x = cdd.pinters(*args) return Polytope.fromcdd(x)