1#ifndef KAORI_BARCODE_POOL_HPP
2#define KAORI_BARCODE_POOL_HPP
31 BarcodePool(std::vector<const char*> barcode_pool,
size_t barcode_length) :
pool(std::move(barcode_pool)),
length(barcode_length) {}
39 if (barcode_pool.size()) {
40 length = barcode_pool.front().size();
41 pool.reserve(barcode_pool.size());
42 for (
const auto& x : barcode_pool) {
44 throw std::runtime_error(
"sequences for a given variable region should be of a constant length");
46 pool.push_back(x.c_str());
54 std::vector<const char*>
pool;
Namespace for the kaori barcode-matching library.
Definition BarcodePool.hpp:13
Pool of barcode sequences for a variable region.
Definition BarcodePool.hpp:21
size_t length
Definition BarcodePool.hpp:59
BarcodePool()
Definition BarcodePool.hpp:25
BarcodePool(std::vector< const char * > barcode_pool, size_t barcode_length)
Definition BarcodePool.hpp:31
size_t size() const
Definition BarcodePool.hpp:64
BarcodePool(const std::vector< std::string > &barcode_pool)
Definition BarcodePool.hpp:38
std::vector< const char * > pool
Definition BarcodePool.hpp:54
const char * operator[](size_t i) const
Definition BarcodePool.hpp:72