5 namespace tdc {
namespace esp {
9 if (allow_long)
return true;
12 for(; i < t.size(); i++) {
14 if (i > 1)
return false;
20 for(; i < t.size(); i++) {
22 if ((i - last) > 3 || (i - last) < 2)
return false;
29 template<
typename LmPred,
typename SpanPush>
37 inline size_t size() {
return right - left + 1; }
39 std::array<Block, 2> blocks {{
45 for(
size_t i = 0; i < size; i++) {
47 blocks[1].left = (i == 0) ? (i) : (i - 1);
48 blocks[1].right = (i == size - 1) ? (i) : (i + 1);
56 if (blocks[1].left == blocks[0].right) {
68 push(blocks[0].left, blocks[0].right);
70 for (
size_t j = 0; j < 1; j++) {
71 blocks[j] = blocks[j + 1];
77 push(blocks[1].left, blocks[1].right);
Contains the text compression and encoding framework.
bool check_landmarks(const T &t, bool allow_long=false)
void landmark_spanner(size_t size, LmPred pred, SpanPush push, bool tie)