Description
Update a Hamming count after one symbol replacement.
Discrete distances depend on the representation of symbols, sets and counts. A local mismatch or count update assumes the surrounding sequence or set bookkeeping is already correct.
Update a Hamming count after one symbol replacement.
When to use this tool
Use Hamming Distance Single Symbol Update when checking a supplied discrete-distance contribution or update.
How to use the tool and how it works
- Enter distance, oldFirst, second, newFirst. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read distance, delta. Use the output convention below.
Update a Hamming count after one symbol replacement. Require nonnegative whole distance; delta is the new mismatch indicator minus the old one, and updated distance must remain nonnegative.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| distance | Distance | Required. Safe integer; minimum 0. |
| oldFirst | Old First | Required. Text; maximum UTF-16 length 8192. |
| second | Second | Required. Text; maximum UTF-16 length 8192. |
| newFirst | New First | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| distance | Distance | Required. Safe integer. |
| delta | Delta | Required. Safe integer. |
{
"input": {
"distance": 3,
"oldFirst": "a",
"second": "a",
"newFirst": "b"
},
"output": {
"distance": 4,
"delta": 1
}
} Limitations and assumptions
- Symbols compare literally; the original complete sequence distance is supplied, not checked.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the full sequences or sets to establish the original distance and actual operation before applying a local update.
References
Similar or alternative tools
- Jaccard Distance One Intersection Update
Update Jaccard distance using supplied intersection and union changes.
- Distance: Discrete Symbol Mismatch Cost
Return a literal symbol mismatch cost.