Consistency zigzag outputs intervals supported over a single complex dev
authorDmitriy Morozov <dmitriy@mrzv.org>
Thu, 13 Aug 2009 13:16:15 -0700
branchdev
changeset 164 f7244460f21f
parent 163 6cd50e622550
child 165 c3c3c53dfc08
Consistency zigzag outputs intervals supported over a single complex
examples/consistency/rips-consistency-zigzag.cpp
--- a/examples/consistency/rips-consistency-zigzag.cpp	Wed Aug 12 21:32:38 2009 -0700
+++ b/examples/consistency/rips-consistency-zigzag.cpp	Thu Aug 13 13:16:15 2009 -0700
@@ -59,6 +59,8 @@
     
     bool            operator<(const BirthInfo& other) const         { if (index == other.index) return (!un && other.un); else return index < other.index; }
     bool            operator>(const BirthInfo& other) const         { return other.operator<(*this); }
+    bool            operator>=(const BirthInfo& other) const        { return !operator<(other); }
+    bool            operator<=(const BirthInfo& other) const        { return !operator>(other); }
 
     Dimension       dimension;
     unsigned        index;
@@ -253,7 +255,7 @@
 
 void        report_death(std::ostream& out, const BirthInfo& birth, const BirthInfo& death, unsigned skeleton_dimension)
 {
-    if (birth.dimension < skeleton_dimension && death > birth)
+    if (birth.dimension < skeleton_dimension && death >= birth)
         out << birth << " --- " << death << std::endl;
 }