Example #1
0
 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")
Example #2
0
def inters(*args):
    x = cdd.pinters(*args)
    return Polytope.fromcdd(x)