@@ -189,6 +189,9 @@ template <class uword = uint32_t> class EWAHBoolArray {
189189 logicaland (a, answer);
190190 return answer;
191191 }
192+ EWAHBoolArray operator &(const EWAHBoolArray &a) const {
193+ return logicaland (a);
194+ }
192195
193196 /* *
194197 * computes the logical and with another compressed bitmap
@@ -199,6 +202,9 @@ template <class uword = uint32_t> class EWAHBoolArray {
199202 */
200203 void logicalandnot (const EWAHBoolArray &a, EWAHBoolArray &container) const ;
201204
205+ EWAHBoolArray operator -(const EWAHBoolArray &a) const {
206+ return logicalandnot (a);
207+ }
202208
203209 /* *
204210 * computes the logical and not with another compressed bitmap
@@ -211,6 +217,8 @@ template <class uword = uint32_t> class EWAHBoolArray {
211217 logicalandnot (a, answer);
212218 return answer;
213219 }
220+
221+
214222 /* *
215223 * tests whether the bitmaps "intersect" (have at least one 1-bit at the same
216224 * position). This function does not modify the existing bitmaps.
@@ -229,6 +237,7 @@ template <class uword = uint32_t> class EWAHBoolArray {
229237 void logicalor (const EWAHBoolArray &a, EWAHBoolArray &container) const ;
230238
231239
240+
232241 /* *
233242 * computes the size (in number of set bits) of the logical or with another compressed bitmap
234243 * Running time complexity is proportional to the sum of the compressed
@@ -275,6 +284,10 @@ template <class uword = uint32_t> class EWAHBoolArray {
275284 return answer;
276285 }
277286
287+ EWAHBoolArray operator |(const EWAHBoolArray &a) const {
288+ return logicalor (a);
289+ }
290+
278291 /* *
279292 * computes the logical xor with another compressed bitmap
280293 * answer goes into container
@@ -294,6 +307,10 @@ template <class uword = uint32_t> class EWAHBoolArray {
294307 logicalxor (a, answer);
295308 return answer;
296309 }
310+
311+ EWAHBoolArray operator ^(const EWAHBoolArray &a) const {
312+ return logicalxor (a);
313+ }
297314 /* *
298315 * clear the content of the bitmap. It does not
299316 * release the memory.
@@ -1502,7 +1519,7 @@ size_t EWAHBoolArray<uword>::addStreamOfDirtyWords(const uword *v,
15021519 buffer.push_back (0 );
15031520 lastRLW = buffer.size () - 1 ;
15041521 ++wordadded;
1505- wordadded += addStreamOfDirtyWords (v + howmanywecanadd, NumberOfLiteralWords - howmanywecanadd);
1522+ wordadded += addStreamOfDirtyWords (v + howmanywecanadd, number - howmanywecanadd);
15061523 return wordadded;
15071524}
15081525
@@ -1528,7 +1545,7 @@ void EWAHBoolArray<uword>::fastaddStreamOfDirtyWords(const uword *v,
15281545 // buffer.insert(buffer.end(), v, v+howmanywecanadd);// seems slower than push_back?
15291546 buffer.push_back (0 );
15301547 lastRLW = buffer.size () - 1 ;
1531- fastaddStreamOfDirtyWords (v + howmanywecanadd, NumberOfLiteralWords - howmanywecanadd);
1548+ fastaddStreamOfDirtyWords (v + howmanywecanadd, number - howmanywecanadd);
15321549}
15331550
15341551
@@ -1558,7 +1575,7 @@ size_t EWAHBoolArray<uword>::addStreamOfNegatedDirtyWords(const uword *v,
15581575 buffer.push_back (0 );
15591576 lastRLW = buffer.size () - 1 ;
15601577 ++wordadded;
1561- wordadded += addStreamOfDirtyWords (v + howmanywecanadd, NumberOfLiteralWords - howmanywecanadd);
1578+ wordadded += addStreamOfDirtyWords (v + howmanywecanadd, number - howmanywecanadd);
15621579 return wordadded;
15631580}
15641581
0 commit comments