5 namespace tdc {
namespace esp {
16 template<
typename ipd_t>
21 static constexpr std::array<size_t, 2> default_key() {
22 return {{ size_t(-1), size_t(-1) }};
25 using a2_t =
typename ipd_t::template IPDMap<2, size_t, size_t>;
31 size_t m_initial_counter = 1;
36 n2(0,
Array<2>(default_key())),
37 counter(counter_start + 1),
38 m_initial_counter(counter_start + 1) {}
41 const size_t vs = v.size();
43 DCHECK(vs == 2 || vs == 3);
45 auto updater = [&](
size_t& v) {
56 auto old_counter = counter;
57 auto r = n2.access(va, updater) - 1;
58 if (counter > old_counter) {
66 between.
m_data[0] = add(v.slice(0, 2));
69 auto old_counter = counter;
70 auto r = n2.access(between, updater) - 1;
71 if (counter > old_counter) {
83 return counter - m_initial_counter;
87 return m_initial_counter;
96 auto discard = std::move(n2);
BitPackingVectorSlice< dynamic_t > in_t
Contains the text compression and encoding framework.
size_t rules_count() const
size_t initial_counter() const
std::array< T, N > m_data
GrammarRules(size_t counter_start)