projects
/
linpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement method Point.aspolyhedron()
[linpy.git]
/
pypol
/
coordinates.py
diff --git
a/pypol/coordinates.py
b/pypol/coordinates.py
index
78e8d4a
..
7923648
100644
(file)
--- a/
pypol/coordinates.py
+++ b/
pypol/coordinates.py
@@
-112,6
+112,13
@@
class Point(Coordinates):
return isinstance(other, Point) and \
self._coordinates == other._coordinates
return isinstance(other, Point) and \
self._coordinates == other._coordinates
+ def aspolyhedron(self):
+ from .polyhedra import Polyhedron
+ equalities = []
+ for symbol, coordinate in self.coordinates():
+ equalities.append(symbol - coordinate)
+ return Polyhedron(equalities)
+
class Vector(Coordinates):
"""
class Vector(Coordinates):
"""