Fixed DynamicPersistenceTrails::PairingTrailsVisitor to match the changes in StaticPersistence::PairVisitor dev
authorDmitriy Morozov <dmitriy@mrzv.org>
Sat, 28 Nov 2009 17:01:52 -0800
branchdev
changeset 175 6a649c2bea0e
parent 174 3f1034dca432
child 176 64177e8ef379
Fixed DynamicPersistenceTrails::PairingTrailsVisitor to match the changes in StaticPersistence::PairVisitor
include/topology/dynamic-persistence.h
include/topology/dynamic-persistence.hpp
--- a/include/topology/dynamic-persistence.h	Sat Nov 28 16:45:42 2009 -0800
+++ b/include/topology/dynamic-persistence.h	Sat Nov 28 17:01:52 2009 -0800
@@ -135,11 +135,12 @@
         struct PairingTrailsVisitor: public Parent::PairVisitor 
         {
             // TODO: this is specialized for std::vector
-                                        PairingTrailsVisitor(OrderIndex bg, ConsistencyComparison ccmp): 
-                                            bg_(bg), ccmp_(ccmp)                        {}
+                                        PairingTrailsVisitor(OrderIndex bg, ConsistencyComparison ccmp, unsigned size): 
+                                            Parent::PairVisitor(size), bg_(bg), ccmp_(ccmp)     {}
 
             void                        init(OrderIndex i) const                        { i->consistency = i - bg_; i->trail.append(i, ccmp_); Count(cTrailLength); }
             void                        update(OrderIndex j, OrderIndex i) const        { i->pair->trail.append(j, ccmp_); Count(cTrailLength); }
+            void                        finished(OrderIndex i) const                    { Parent::PairVisitor::finished(i); }
 
             OrderIndex                  bg_;
             ConsistencyComparison       ccmp_;
--- a/include/topology/dynamic-persistence.hpp	Sat Nov 28 16:45:42 2009 -0800
+++ b/include/topology/dynamic-persistence.hpp	Sat Nov 28 17:01:52 2009 -0800
@@ -34,7 +34,7 @@
 DynamicPersistenceTrails<D,CT,Cmp,OT,CI,CC,E>::
 pair_simplices()
 { 
-    Parent::pair_simplices(begin(), end(), PairingTrailsVisitor(begin(), ccmp_));
+    Parent::pair_simplices(begin(), end(), PairingTrailsVisitor(begin(), ccmp_, size()));
 }
 
 template<class D, class CT, class Cmp, class OT, class CI, class CC, class E>