--- a/bindings/python/dionysus/__init__.py Tue Sep 14 11:12:33 2010 -0700
+++ b/bindings/python/dionysus/__init__.py Tue Sep 14 11:34:11 2010 -0700
@@ -17,6 +17,10 @@
Simplex._cpp_repr_ = Simplex.__repr__
Simplex.__repr__ = repr_with_data
+def Simplex_getinitargs(self):
+ return ([v for v in self.vertices], self.data)
+
+Simplex.__getinitargs__ = Simplex_getinitargs
def data_cmp(s1, s2):
return cmp(s1.data, s2.data)
--- a/bindings/python/simplex.cpp Tue Sep 14 11:12:33 2010 -0700
+++ b/bindings/python/simplex.cpp Tue Sep 14 11:34:11 2010 -0700
@@ -87,6 +87,7 @@
.def("__hash__", &hash_simplex<dp::Vertex, dp::Data>)
.def("__eq__", &eq_simplex<dp::Vertex, dp::Data>)
+ .enable_pickling()
;
bp::class_<dp::SimplexObject>("SimplexObject")