//! Compile-time tables backing the normalized k-mer entropy formula: the
//! max-entropy correction for small samples. See `docmd/theory/entropy.md`.
//!
//! Entropy is computed directly on raw (non-canonicalized) sub-words — no
//! equivalence-class folding. Empirically (see the discussion that produced
//! this crate's history), folding sub-words into circular/revcomp classes
//! before unfolding them back buys nothing for the invariances it was meant
//! to guarantee (both hold for raw sub-word entropy already, by a direct
//! bijection argument for revcomp and by the sliding window's own dynamics
//! for tandem repeats), while it measurably *weakens* detection of the
//! low-complexity sequences the filter exists to catch.

include!(concat!(env!("OUT_DIR"), "/entropy_tables.rs"));

pub(crate) const WS_MAX: usize = 6;

#[inline(always)]
pub(crate) const fn n_log_n(n: usize) -> f64 {
    N_LOG_N[n]
}

#[inline(always)]
pub(crate) const fn emax(k: usize, ws: usize) -> f64 {
    EMAX[k][ws]
}

#[inline(always)]
pub(crate) const fn log_nwords(k: usize, ws: usize) -> f64 {
    LOG_NWORDS[k][ws]
}
