added subset functions

[SVN r14646]
This commit is contained in:
Jeremy Siek
2002-07-30 22:23:54 +00:00
parent 331596873c
commit d422494287

View File

@@ -178,6 +178,9 @@ public:
unsigned long <a href="#to_ulong">to_ulong</a>() const;
size_type <a href="#size">size</a>() const;
bool <a href="#is_subset_of">is_subset_of</a>(const dynamic_bitset& a) const;
bool <a href="#is_proper_subset_of">is_proper_subset_of</a>(const dynamic_bitset& a) const;
};
template &lt;typename B, typename A&gt;
@@ -1058,6 +1061,31 @@ can not be represented in an <tt>unsigned long</tt>.
<hr>
<pre>
bool <a name="is_subset_of">is_subset_of</a>(const dynamic_bitset&amp; a) const
</pre>
<b>Requires:</b> <tt>this->size() == a.size()</tt><br>
<b>Returns:</b> true if this bitset is a subset of bitset <tt>a</tt>.
That is, it returns true if, for every bit in this bitset, the
corresponding bit in bitset <tt>a</tt> is also set. Otherwise this
function returns false.<br>
<b>Throws:</b> nothing.
<hr>
<pre>
bool <a name="is_proper_subset_of">is_proper_subset_of</a>(const dynamic_bitset&amp; a) const
</pre>
<b>Requires:</b> <tt>this->size() == a.size()</tt><br>
<b>Returns:</b> true if this bitset is a proper subset of bitset <tt>a</tt>.
That is, it returns true if, for every bit in this bitset, the
corresponding bit in bitset <tt>a</tt> is also set and if
<tt>this->count() < a.count()</tt>. Otherwise this
function returns false.<br>
<b>Throws:</b> nothing.
<hr>
<pre>
bool <a name="op-equal">operator==</a>(const dynamic_bitset&amp; rhs) const
</pre>