projects
/
linpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add abstract class GeometricObject
[linpy.git]
/
pypol
/
polyhedra.py
diff --git
a/pypol/polyhedra.py
b/pypol/polyhedra.py
index
a08213d
..
2eaa7b5
100644
(file)
--- a/
pypol/polyhedra.py
+++ b/
pypol/polyhedra.py
@@
-6,6
+6,7
@@
import numbers
from . import islhelper
from .islhelper import mainctx, libisl
from . import islhelper
from .islhelper import mainctx, libisl
+from .geometry import GeometricObject
from .coordinates import Point
from .linexprs import Expression, Symbol, Rational
from .domains import Domain
from .coordinates import Point
from .linexprs import Expression, Symbol, Rational
from .domains import Domain
@@
-33,11
+34,7
@@
class Polyhedron(Domain):
if inequalities is not None:
raise TypeError('too many arguments')
return cls.fromstring(equalities)
if inequalities is not None:
raise TypeError('too many arguments')
return cls.fromstring(equalities)
- elif isinstance(equalities, Polyhedron):
- if inequalities is not None:
- raise TypeError('too many arguments')
- return equalities
- elif isinstance(equalities, Domain):
+ elif isinstance(equalities, GeometricObject):
if inequalities is not None:
raise TypeError('too many arguments')
return equalities.aspolyhedron()
if inequalities is not None:
raise TypeError('too many arguments')
return equalities.aspolyhedron()