return array;
}
+ /** Count the number of 1s. */
+ size_t size() const {
+ return get_ones().size();
+ }
+
/** Two vectors are equal if they contain the same indices. */
bool operator==(const sorted_boolean_vector<IT> &vec) const {
return get_ones() == vec.get_ones();
return array;
}
+ /** Count the number of 1s. */
+ size_t size() const {
+ return get_ones().size();
+ }
+
/** Two vectors are equal if they contain the same indices. */
bool operator==(const heapsorted_boolean_vector<IT> &vec) const {
return get_ones() == vec.get_ones();
/** Returns true if vector contains no 1. */
bool isempty() const {
- strip_heap();
- return isheap ? heapsize==0 : array.size()==0;
+ if (isheap) {
+ strip_heap();
+ return heapsize == 0;
+ } else
+ return array.size() == 0;
}
/** Print this vector */