MCPcopy Create free account
hub / github.com/comaps/comaps / RevBWT

Function RevBWT

libs/coding/bwt.cpp:166–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void RevBWT(size_t n, size_t start, uint8_t const * s, uint8_t * r)
167{
168 if (n == 0)
169 return;
170
171 FirstColumn first(n, s);
172 LastColumn last(n, start, s);
173
174 auto curr = start + 1;
175 for (size_t i = 0; i < n; ++i)
176 {
177 ASSERT_LESS(curr, first.Size(), ());
178 ASSERT(first[curr] != kEOS, ());
179
180 r[i] = first[curr];
181 curr = last.Select(r[i], first.Rank(curr));
182 }
183
184 ASSERT_EQUAL(first[curr], kEOS, ());
185}
186
187void RevBWT(size_t start, std::string const & s, std::string & r)
188{

Callers 2

ReadAndDecodeBlockMethod · 0.85
RevRevBWTFunction · 0.85

Calls 7

ASSERTFunction · 0.85
RankMethod · 0.80
SizeMethod · 0.45
SelectMethod · 0.45
sizeMethod · 0.45
assignMethod · 0.45
dataMethod · 0.45

Tested by 1

RevRevBWTFunction · 0.68