Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

SparseBitvector_setdifference.hpp File Reference

#include <iostream>
#include "common/debug.hpp"
#include "SparseBitvector.hpp"

Include dependency graph for SparseBitvector_setdifference.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define __SPARSE_BITVECTOR_SETDIFFERENCE__   t

Functions

template<bool EARLY_FILTERING>
bool setdifference (SparseBitvector &result, const SparseBitvector &x, const SparseBitvector &y, const int maximalLength)
 Compute setdifference of two sparse bitvectors, i.e.
template<bool EARLY_FILTERING>
int cardinalityOfSetdifference (const SparseBitvector &x, const SparseBitvector &y, const int maximalLength)
 Compute the cardinality of the setdifference of two sparse bitvectors, i.e.


Define Documentation

#define __SPARSE_BITVECTOR_SETDIFFERENCE__   t
 

Definition at line 9 of file SparseBitvector_setdifference.hpp.


Function Documentation

template<bool EARLY_FILTERING>
int cardinalityOfSetdifference const SparseBitvector x,
const SparseBitvector y,
const int  maximalLength
[inline]
 

Compute the cardinality of the setdifference of two sparse bitvectors, i.e.

, compute $|x \setminus y|$ . Exit operation if the result has more than a given number of elements.

Parameters:
x bitvector to subtract from. REQ: length(x) > 0.
y bitvector to subtract. REQ: length(y) > 0.
maximalLength maximal length of result.
Returns:
cardinality of the setdifference of x by y, if it is at most maximalLength, or maximalLength+1 if it is larger.

Definition at line 129 of file SparseBitvector_setdifference.hpp.

References SparseBitvector::begin(), SparseBitvector::end(), and SparseBitvector::length().

template<bool EARLY_FILTERING>
bool setdifference SparseBitvector result,
const SparseBitvector x,
const SparseBitvector y,
const int  maximalLength
[inline]
 

Compute setdifference of two sparse bitvectors, i.e.

, compute $x \setminus y$ . Exit operation if the result has more than a given number of elements.

Parameters:
result output bitvector to fill setdifference into. REQ: capacity(result) >= maximalLength Please note: result will only be correct if true is returned.
x bitvector to subtract from. REQ: length(x) > 0.
y bitvector to subtract. REQ: length(y) > 0.
maximalLength maximal length of result.
Returns:
true if the result has at most maximalLength elements.

Definition at line 30 of file SparseBitvector_setdifference.hpp.

References SparseBitvector::begin(), SparseBitvector::beginUnbounded(), SparseBitvector::capacity(), SparseBitvector::end(), SparseBitvector::length(), and SparseBitvector::resizeToEndOf().


Generated on Sun Sep 17 17:54:27 2006 for FIM environment by  doxygen 1.4.4