18 Meta m(
"plcp",
"from_phi");
26 template<
typename textds_t>
30 const size_t n = t.size();
38 for(
len_t i = 0, l = 0; i < n - 1; ++i) {
39 const len_t phii = (*this)[i];
40 while(t[i+l] == t[phii+l]) ++l;
41 m_max = std::max(m_max, l);
60 debug_check_array_is_initialized();
Contains the text compression and encoding framework.
constexpr uint_fast8_t bits_for(size_t n)
Computes the number of bits required to store the given integer value.
Data structures are constructed directly in bit-compressed space (slower construction, but smaller memory usage).
PLCPFromPhi(Env &&env, textds_t &t, CompressMode cm)
Constructs the PLCP array using the phi array.
Base for data structures that use an integer array as a storage.
CompressMode
Defines when data structures are bit-compressed.
Env & env()
Provides access to the environment that the algorithm works in.
fast_t< len_compact_t > len_t
Type to represent an length value.
void set_array(iv_t &&iv)
static void log(const char *key, const T &value)
Logs a user statistic for the current phase.
static ds::InputRestrictions restrictions()
uint64_t bit_size() const
static auto wrap(const char *title, F func) -> typename std::result_of< F(StatPhase &)>::type
Executes a lambda as a single statistics phase.
Data structures are bit-compressed after they have been constructed (fast construction, but possibly high memory peak).
Local environment for a compression/encoding/decompression call.
Interface for algorithms.