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
/
coordinates.py
diff --git
a/pypol/coordinates.py
b/pypol/coordinates.py
index
a880178
..
ceab418
100644
(file)
--- a/
pypol/coordinates.py
+++ b/
pypol/coordinates.py
@@
-4,6
+4,7
@@
import operator
from collections import OrderedDict, Mapping
from collections import OrderedDict, Mapping
+from .geometry import GeometricObject
from .linexprs import Symbol
from .linexprs import Symbol
@@
-78,7
+79,7
@@
class Coordinates:
yield symbol, func(coordinate1, coordinate2)
yield symbol, func(coordinate1, coordinate2)
-class Point(Coordinates):
+class Point(Coordinates
, GeometricObject
):
"""
This class represents points in space.
"""
"""
This class represents points in space.
"""
@@
-120,10
+121,6
@@
class Vector(Coordinates):
This class represents displacements in space.
"""
This class represents displacements in space.
"""
- __slots__ = (
- '_coordinates',
- )
-
def __new__(cls, initial, terminal=None):
if not isinstance(initial, Point):
initial = Point(initial)
def __new__(cls, initial, terminal=None):
if not isinstance(initial, Point):
initial = Point(initial)