MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / find_first_seq_any

Function find_first_seq_any

server/src/server/prefix_cache.cpp:80–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79
80 return false;
81}
82
83// ─── Boundary detection ─────────────────────────────────────────────────
84
85static bool seq_at(const std::vector<int32_t> & ids, int idx,
86 const std::vector<int32_t> & seq) {
87 if (idx < 0 || idx + (int)seq.size() > (int)ids.size()) return false;
88 for (int k = 0; k < (int)seq.size(); k++) {
89 if (ids[idx + k] != seq[k]) return false;
90 }
91 return true;
92}
93
94static int find_first_seq(const std::vector<int32_t> & ids,
95 const std::vector<int32_t> & seq, int start = 0) {

Callers 1

find_all_boundariesFunction · 0.85

Calls 2

find_first_seqFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected