Skip to main content
Algorithm 2 | Algorithms for Molecular Biology

Algorithm 2

From: Fulgor: a fast and compact k-mer index for large-scale matching and color queries

Algorithm 2

The \(\textsc {Intersect}\) algorithm for a set of iterators \(I=\{i_1,\ldots ,i_p\}\). An iterator object supports three primitive operations: \(\textsc {Value}{()}\), returning the value currently pointed to by the iterator; \(\textsc {Next}{()}\), returning the value immediately after the one currently pointed to by the iterator; \(\textsc {Next-GEQ}{(x)}\), returning the smallest value that is larger-than or equal-to x. We assume that if i is an iterator over color \(C_j\) then calling \(i.\textsc {Next}{()}\) for more than \(|C_j|\) times will return the (invalid) reference id \(N+1\)

Back to article page