25 Meta m(
"lcpcomp_comp",
"max_lcp");
35 template<
typename text_t>
45 auto& sa = text.require_sa();
46 auto& isa = text.require_isa();
49 auto lcp = text.release_lcp();
53 lcp, threshold, lcp.max_lcp());
61 while(list.size() > 0) {
63 size_t m = list.get_max();
67 size_t fsrc = sa[m-1];
73 for(
size_t k = 0; k < flen; k++) {
74 size_t i = isa[fpos + k];
75 if(list.contains(i)) {
81 for(
size_t k = 0; k < flen && fpos > k; k++) {
82 size_t s = fpos - k - 1;
84 if(list.contains(i)) {
85 if(s + lcp[i] > fpos) {
88 list.decrease_key(i, l);
Contains the text compression and encoding framework.
Implements the original "Max LCP" selection strategy for LCPComp.
static ds::dsflags_t textds_flags()
Provides constant-time access to the suffix in a suffix array with the longest correspondig lcp table...
Algorithm(Algorithm const &)=default
void emplace_back(len_t fpos, len_t fsrc, len_t flen)
void factorize(text_t &text, size_t threshold, lzss::FactorBuffer &factors)
static void log(const char *key, const T &value)
Logs a user statistic for the current phase.
static auto wrap(const char *title, F func) -> typename std::result_of< F(StatPhase &)>::type
Executes a lambda as a single statistics phase.
Interface for algorithms.