Count cocycles in CohomologyPersistence dev
authorDmitriy Morozov <dmitriy@mrzv.org>
Fri, 05 Mar 2010 09:26:54 -0800
branchdev
changeset 205 f5d010aecc97
parent 204 7653574ff064
child 206 4a80392ab462
Count cocycles in CohomologyPersistence
include/topology/cohomology-persistence.hpp
--- a/include/topology/cohomology-persistence.hpp	Tue Feb 23 17:39:15 2010 -0800
+++ b/include/topology/cohomology-persistence.hpp	Fri Mar 05 09:26:54 2010 -0800
@@ -25,6 +25,7 @@
 static Counter*  cCohomologyAddBasic =                  GetCounter("cohomology/add/basic");
 static Counter*  cCohomologyAddComparison =             GetCounter("cohomology/add/comparison");
 static Counter*  cCohomologyElementCount =              GetCounter("cohomology/elements");
+static Counter*  cCohomologyCocycleCount =              GetCounter("cohomology/cocycles");
 #endif // COUNTERS
 
 template<class BirthInfo, class SimplexData, class Field>
@@ -152,6 +153,7 @@
         rLog(rlCohomology,  "  Cocyle: %d", si->order);
         
         Count(cCohomologyElementCount);
+        Count(cCohomologyCocycleCount);
 
         boost::shared_ptr<ZColumn> p = boost::make_shared<ZColumn>();
         return boost::make_tuple(si, Death(), p);
@@ -189,6 +191,7 @@
         cur->unlink();
     
     CountBy(cCohomologyElementCount, -z.first->zcolumn.size());
+    CountBy(cCohomologyCocycleCount, -1);
     boost::shared_ptr<ZColumn> p = boost::make_shared<ZColumn>();
     p->swap(z.first->zcolumn);
     cocycles_.erase(z.first);