Skip to content

Commit

Permalink
expose bits
Browse files Browse the repository at this point in the history
  • Loading branch information
maickrau committed Oct 31, 2023
1 parent 96813bc commit 181a611
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/RankBitvector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,8 @@ size_t RankBitvector::getRank(size_t index) const
size_t bigChunk = chunk / SmallRanksPerBig;
return chunkSum + smallRanks[chunk] + bigRanks[bigChunk];
}

std::vector<uint64_t>& RankBitvector::getBits()
{
return bits;
}
1 change: 1 addition & 0 deletions src/RankBitvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class RankBitvector
size_t size() const;
void resize(size_t size);
void push_back(bool val);
std::vector<uint64_t>& getBits();
private:
bool ranksBuilt;
std::vector<uint64_t> bits;
Expand Down

0 comments on commit 181a611

Please sign in to comment.