Returns the index of the |rank|-th |byte| in the canonical BWT last column.
| 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 | |
| 128 | private: |
| 129 | size_t const m_n; |