MCPcopy Create free account
hub / github.com/BirolLab/abyss / Build

Method Build

FMIndex/bit_array.cc:58–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void BitArray::Build() {
59 one_num_ = 0;
60 uint64_t table_num = ((bit_blocks_.size() + TABLE_INTERVAL - 1) / TABLE_INTERVAL) + 1;
61 rank_tables_.resize(table_num);
62 for (size_t i = 0; i < bit_blocks_.size(); ++i){
63 if ((i % TABLE_INTERVAL) == 0){
64 rank_tables_[i/TABLE_INTERVAL] = one_num_;
65 }
66 one_num_ += PopCount(bit_blocks_[i]);
67 }
68 rank_tables_.back() = one_num_;
69}
70
71void BitArray::SetBit(uint64_t bit, uint64_t pos) {
72 if (!bit) return;

Callers 1

assignMethod · 0.80

Calls 3

resizeMethod · 0.80
sizeMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected