Function noLZSS::detail::build_sa_predecessor

Function Documentation

inline RangePredecessor noLZSS::detail::build_sa_predecessor(const cst_t &cst)

Builds the range-predecessor index over the suffix array of a plain CST.

Needed only for RefPolicy::Last. The suffix array is materialised by walking psi from the rank of suffix 0, which costs O(n) psi accesses instead of O(n) sampled SA accesses.

Parameters:

cst – Compressed suffix tree over the text (including the terminating sentinel)

Returns:

Predecessor index whose values are text positions; the sentinel position is “absent”