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

SparseBitmatrix_intersection.hpp File Reference

#include "SparseBitvector_intersection.hpp"
#include "common/debug.hpp"
#include <vector>

Include dependency graph for SparseBitmatrix_intersection.hpp:

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

Go to the source code of this file.

Defines

#define __SPARSEBITMATRIX_INTERSECTION_HPP_   t
 SparseBitmatrix_intersection.hpp -- compute intersections of all rows of a sparse bitmatrix with a given one of its rows.

Functions

template<bool EARLY_FILTERING, bool INTERSECTION_ROWSWAPPING, bool REMOVE_IDENTICAL_ROWS, class OutputIterator>
int intersectSparseBitmatrix (const SparseBitmatrix &bmIn, const int row, SparseBitmatrix &bmOut, const int minimalLength, OutputIterator identicalRowsIterator)
 Intersect all rows (with higher index) with a given row.
template<bool EARLY_FILTERING, bool INTERSECTION_ROWSWAPPING, bool REMOVE_IDENTICAL_ROWS, class OutputIterator>
int intersectSparseBitmatrix (const SparseBitmatrix &bmIn, const int row, const vector< int > otherRows, SparseBitmatrix &bmOut, const int minimalLength, OutputIterator identicalRowsIterator)
 Intersect some rows (with given index) with a given row.
template<bool EARLY_FILTERING>
int cardinalityIntersectionSparseBitmatrix_TwoRows (const SparseBitmatrix &bmIn, const int minimalLength)
 Special case: only two rows.


Define Documentation

#define __SPARSEBITMATRIX_INTERSECTION_HPP_   t
 

SparseBitmatrix_intersection.hpp -- compute intersections of all rows of a sparse bitmatrix with a given one of its rows.

Definition at line 7 of file SparseBitmatrix_intersection.hpp.


Function Documentation

template<bool EARLY_FILTERING>
int cardinalityIntersectionSparseBitmatrix_TwoRows const SparseBitmatrix bmIn,
const int  minimalLength
 

Special case: only two rows.

Compute $|row1 \cap row0|$ if >= minimalLength; return 0 otherwise.

Definition at line 138 of file SparseBitmatrix_intersection.hpp.

References GET_ROW.

template<bool EARLY_FILTERING, bool INTERSECTION_ROWSWAPPING, bool REMOVE_IDENTICAL_ROWS, class OutputIterator>
int intersectSparseBitmatrix const SparseBitmatrix bmIn,
const int  row,
const vector< int >  otherRows,
SparseBitmatrix bmOut,
const int  minimalLength,
OutputIterator  identicalRowsIterator
 

Intersect some rows (with given index) with a given row.

I.e., compute $bmIn_row \cap bmIn_row'$ for all row' > row. Retain only rows with at least a given minimal length and that are not identical to the reference row; mark row indices of rows identical to the reference row.

Parameters:
bmIn original bit matrix. For all row'>=row is length(row') >= minimalLength.
row reference row to intersect other rows with.
otherRows vector of other rows to intersect with reference row.
bmOut output bit matrix to fill intersection into. The i-th row must have capacity(i) >= min(length(row), length(row+1+i))
minimalLength minimal length of output rows.
Returns:
number of rows in output bit matrix.

Definition at line 89 of file SparseBitmatrix_intersection.hpp.

References GET_ROW, SparseBitmatrix::nRows(), SparseBitmatrix::rowLabel(), SparseBitmatrix::setMaxRowLength(), SparseBitmatrix::setNRows(), and SparseBitmatrix::setRowLabel().

template<bool EARLY_FILTERING, bool INTERSECTION_ROWSWAPPING, bool REMOVE_IDENTICAL_ROWS, class OutputIterator>
int intersectSparseBitmatrix const SparseBitmatrix bmIn,
const int  row,
SparseBitmatrix bmOut,
const int  minimalLength,
OutputIterator  identicalRowsIterator
 

Intersect all rows (with higher index) with a given row.

I.e., compute $bmIn_row \cap bmIn_row'$ for all row' > row. Retain only rows with at least a given minimal length and that are not identical to the reference row; mark row indices of rows identical to the reference row.

Parameters:
bmIn original bit matrix. For all row'>=row is length(row') >= minimalLength.
row reference row to intersect all other rows (with higher index) with.
bmOut output bit matrix to fill intersection into. The i-th row must have capacity(i) >= min(length(row), length(row+1+i))
minimalLength minimal length of output rows.
Returns:
number of rows in output bit matrix.

Definition at line 30 of file SparseBitmatrix_intersection.hpp.

References GET_ROW, SparseBitmatrix::nRows(), SparseBitmatrix::rowLabel(), SparseBitmatrix::setMaxRowLength(), SparseBitmatrix::setNRows(), and SparseBitmatrix::setRowLabel().


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