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

Method Select

libs/coding/bwt.cpp:116–126  ·  view source on GitHub ↗

Returns the index of the |rank|-th |byte| in the canonical BWT last column.

Source from the content-addressed store, hash-verified

114 // Returns the index of the |rank|-th |byte| in the canonical BWT
115 // last column.
116 size_t Select(uint32_t byte, size_t rank)
117 {
118 if (byte == kEOS)
119 {
120 ASSERT_EQUAL(rank, 0, ());
121 return 0;
122 }
123
124 ASSERT_LESS(rank, m_table[byte].size(), (byte, rank));
125 return m_table[byte][rank];
126 }
127
128private:
129 size_t const m_n;

Callers 1

RevBWTFunction · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected