Initial directory structure.

git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@1 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Initial import.



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@2 aa51f1b6-e21a-0410-9ad4-b77617c82e60
2D geometry functions



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@3 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Matrix slices in column major; cleaned up geometry classes by adding "connect"
method.



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@4 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Added 3D classes.



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@5 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Double-dispatch transforms for geometry



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@6 aa51f1b6-e21a-0410-9ad4-b77617c82e60
setup.py for registering with PyPI



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@7 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Fix to __slots__ option; enabled by default (benchmarks faster)



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@8 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Merge refactor branch 10:11 in.



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@12 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Documentation update for Plane



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@13 aa51f1b6-e21a-0410-9ad4-b77617c82e60


git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@14 aa51f1b6-e21a-0410-9ad4-b77617c82e60


git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@15 aa51f1b6-e21a-0410-9ad4-b77617c82e60


git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@16 aa51f1b6-e21a-0410-9ad4-b77617c82e60


git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@17 aa51f1b6-e21a-0410-9ad4-b77617c82e60


git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@18 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Add __getstate__ and __setstate__ methods to all classes to allow pickling of
objects even with __slots__.


Index: euclid.py
===================================================================
--- euclid.py	(revision 18)
+++ euclid.py	(working copy)
@@ -56,11 +56,32 @@
 # Implement _use_slots magic.
 class _EuclidMetaclass(type):
     def __new__(cls, name, bases, dct):
+        if '__slots__' in dct:
+            dct['__getstate__'] = cls._create_getstate(dct['__slots__'])
+            dct['__setstate__'] = cls._create_setstate(dct['__slots__'])
         if _use_slots:
             return type.__new__(cls, name, bases + (object,), dct)
         else:
-            del dct['__slots__']
+            if '__slots__' in dct:
+                del dct['__slots__']
             return types.ClassType.__new__(types.ClassType, name, bases, dct)
+
+    @classmethod
+    def _create_getstate(cls, slots):
+        def __getstate__(self):
+            d = {}
+            for slot in slots:
+                d[slot] = getattr(self, slot)
+            return d
+        return __getstate__
+
+    @classmethod
+    def _create_setstate(cls, slots):
+        def __setstate__(self, state):
+            for name, value in state.items():
+                setattr(self, name, value)
+        return __setstate__
+
 __metaclass__ = _EuclidMetaclass
 
 class Vector2:



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@19 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Local variable optimisations from Will McGugan.



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@20 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Fixes to matrix multiplication from expresionista



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@21 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Issue 2: fix __ne__ error.



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@22 aa51f1b6-e21a-0410-9ad4-b77617c82e60
Issue 3: typo in Point3.connect



git-svn-id: http://pyeuclid.googlecode.com/svn/trunk@23 aa51f1b6-e21a-0410-9ad4-b77617c82e60