btllib

Public Member Functions | List of all members
btllib::KmerBloomFilter Class Reference

`#include <bloom_filter.hpp>`

## Public Member Functions
| KmerBloomFilter (unsigned k, size_t bytes, unsigned hash_num=4)
void | insert (const std::string &seq)
void | insert (const char *seq, size_t seq_len)
unsigned | contains (const std::string &seq)
unsigned | contains (const char *seq, size_t seq_len)

## Detailed Description

Bloom filter data structure that kmerizes and hashes given sequences, storing the results.

## Constructor & Destructor Documentation

## ◆ KmerBloomFilter()

btllib::KmerBloomFilter::KmerBloomFilter | ( | unsigned | k,
|  | size_t | bytes,
|  | unsigned | hash_num = `4`
| ) |  |
| inline

Constructor.

Parameters

  k | kmer size
  bytes | bytes to allocate for the filter
  hash_num | number of hashes

## Member Function Documentation

## ◆ contains() [1/2]

unsigned btllib::KmerBloomFilter::contains | ( | const char * | seq,
|  | size_t | seq_len
| ) |  |
| inline

Query the kmers of a sequence.

Parameters

  seq | sequence to kmerize
  seq_len | length of seq

Returns
  number of kmers found in seq

## ◆ contains() [2/2]

unsigned btllib::KmerBloomFilter::contains | ( | const std::string & | seq | ) |
| inline

Query the kmers of a sequence.

Parameters

  seq | sequence to kmerize

Returns
  number of kmers found in seq

## ◆ insert() [1/2]

void btllib::KmerBloomFilter::insert | ( | const char * | seq,
|  | size_t | seq_len
| ) |  |
| inline

Store the kmers of a sequence.

Parameters

  seq | sequence to kmerize
  seq_len | length of seq

## ◆ insert() [2/2]

void btllib::KmerBloomFilter::insert | ( | const std::string & | seq | ) |
| inline

Store the kmers of a sequence.

Parameters

  seq | sequence to kmerize

The documentation for this class was generated from the following file:

- include/btllib/bloom_filter.hpp