diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2023-09-25 14:37:51 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2023-09-25 14:38:15 +0000 |
commit | 96dc50a40ca298182e347c600f327aa99dc5659e (patch) | |
tree | 0869ff7670cf339b54026d553b8240420c4f30fa /vespalib | |
parent | 751c8d7e54f3f9b9fdcc7b77ee6a021c70655e96 (diff) |
Fix printing of sparse states
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/fuzzy/sparse_state.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vespalib/src/vespa/vespalib/fuzzy/sparse_state.h b/vespalib/src/vespa/vespalib/fuzzy/sparse_state.h index d20cfc07a9a..dfec0bac4a8 100644 --- a/vespalib/src/vespa/vespalib/fuzzy/sparse_state.h +++ b/vespalib/src/vespa/vespalib/fuzzy/sparse_state.h @@ -112,11 +112,11 @@ std::ostream& operator<<(std::ostream& os, const FixedSparseState<MaxEdits>& s) if (i != 0) { os << ", "; } - for (size_t j = last_idx; j < s.indices[i]; ++j) { + for (size_t j = last_idx; j < s.index(i); ++j) { os << "-, "; } - last_idx = s.indices[i] + 1; - os << static_cast<uint32_t>(s.costs[i]); + last_idx = s.index(i) + 1; + os << static_cast<uint32_t>(s.cost(i)); } os << "]"; return os; |