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

LightVector_set_intersection.hpp File Reference

#include "common/debug.hpp"
#include "LightVector.hpp"

Include dependency graph for LightVector_set_intersection.hpp:

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

Go to the source code of this file.

Defines

#define __LIGHT_VECTOR_SET_INTERSECTION__   t

Functions

template<bool EARLY_FILTERING, class TYPE>
bool set_intersection (LightVector< TYPE > &result, const LightVector< TYPE > &x, const LightVector< TYPE > &y, const int minimalSize=0)
 Intersect two vectors interpreted as ascending sorted lists of values, i.e.
template<bool EARLY_FILTERING, class TYPE>
int cardinality_of_set_intersection (const LightVector< TYPE > &x, const LightVector< TYPE > &y, const int minimalSize=0)
 Compute the cardinality of the intersect of two sparse bitvectors, i.e.


Detailed Description

Author:
Lars Schmidt-Thieme
Date:
2005-05-18

Definition in file LightVector_set_intersection.hpp.


Define Documentation

#define __LIGHT_VECTOR_SET_INTERSECTION__   t
 

Definition at line 9 of file LightVector_set_intersection.hpp.


Function Documentation

template<bool EARLY_FILTERING, class TYPE>
int cardinality_of_set_intersection const LightVector< TYPE > &  x,
const LightVector< TYPE > &  y,
const int  minimalSize = 0
[inline]
 

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

, compute $|x \cap y|$ . Exit operation if result has not at least a given minimal size.

Parameters:
x first bitvector to intersect. REQ: size(x) > 0.
y second bitvector to intersect. REQ: size(y) > 0.
minimalSize minimal size of result. (optional)
Returns:
number of elements in the intersection, if result has at least size minimalSize, 0 otherwise..

Definition at line 94 of file LightVector_set_intersection.hpp.

References LightVector< TYPE >::begin(), LightVector< TYPE >::end(), and LightVector< TYPE >::size().

template<bool EARLY_FILTERING, class TYPE>
bool set_intersection LightVector< TYPE > &  result,
const LightVector< TYPE > &  x,
const LightVector< TYPE > &  y,
const int  minimalSize = 0
[inline]
 

Intersect two vectors interpreted as ascending sorted lists of values, i.e.

, compute $x \cap y$ . With feature EARLY_FILTERING, exit operation if result has not at least a given minimal length.

Parameters:
result output bitvector to fill intersection into. Please note: result will only be correct if true is returned.
x first bitvector to intersect. REQ: length(x) > 0.
y second bitvector to intersect. REQ: length(y) > 0.
minimalSize minimal length of result (optional).
Returns:
true if result has at least length minimalLength.

Definition at line 28 of file LightVector_set_intersection.hpp.

References LightVector< TYPE >::begin(), LightVector< TYPE >::capacity(), LightVector< TYPE >::end(), and LightVector< TYPE >::size().


Generated on Sun Sep 17 17:53:03 2006 for FIM environment by  doxygen 1.4.4