aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chilbert/BigBitVec.hpp10
-rw-r--r--chilbert/FixBitVec.hpp10
2 files changed, 20 insertions, 0 deletions
diff --git a/chilbert/BigBitVec.hpp b/chilbert/BigBitVec.hpp
index 7a1b49a..aa8e7e1 100644
--- a/chilbert/BigBitVec.hpp
+++ b/chilbert/BigBitVec.hpp
@@ -104,6 +104,16 @@ public:
return *this;
}
+ bool operator==(const CBigBitVec& vec) const
+ {
+ return (
+ rackCount() == vec.rackCount() &&
+ (rackCount() == 0 ||
+ !memcmp(racks(), vec.racks(), rackCount() * sizeof(FBV_UINT))));
+ }
+
+ bool operator!=(const CBigBitVec& vec) const { return !(*this == vec); }
+
/// Non-resizing assignment
CBigBitVec& operator=(const CBigBitVec& vec)
{
diff --git a/chilbert/FixBitVec.hpp b/chilbert/FixBitVec.hpp
index ac02e40..05af40e 100644
--- a/chilbert/FixBitVec.hpp
+++ b/chilbert/FixBitVec.hpp
@@ -96,6 +96,16 @@ public:
return *this;
}
+ bool operator==(const CFixBitVec& vec) const
+ {
+ return m_rack == vec.m_rack;
+ }
+
+ bool operator!=(const CFixBitVec& vec) const
+ {
+ return m_rack != vec.m_rack;
+ }
+
CFixBitVec& operator=(const FBV_UINT i)
{
m_rack = i;