18 Meta m(
"lcp",
"from_phi");
26 template<
typename textds_t>
31 auto& sa = t.require_sa(cm);
32 auto& plcp = t.require_plcp(cm);
34 const size_t n = t.size();
38 m_max = plcp.max_lcp();
44 for(
len_t i = 1; i < n; i++) {
45 const len_t x = plcp[sa[i]];
61 debug_check_array_is_initialized();
static ds::InputRestrictions restrictions()
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.
DynamicIntVector iv_t
The type of integer array to use as storage.
Data structures are constructed directly in bit-compressed space (slower construction, but smaller memory usage).
LCPFromPLCP(Env &&env, textds_t &t, CompressMode cm)
Base for data structures that use an integer array as a storage.
Constructs the LCP array using the Phi algorithm.
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.
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.
constexpr size_t INDEX_FAST_BITS
The amount of bits required to store the binary representation of a value of type len_t...
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.