Expand description
Fixed-point edit costs (unit = 16) and keyboard-layout adjacency.
Integer costs make the search bounds exact and the results identical on every platform. All values below are provisional until the calibration phase.
Structs§
- Cost
Model - Costs of the four edit operations.
Enums§
- Layout
- A physical keyboard layout, from which the neighbouring-key relation of a
CostModelis derived.
Constants§
- COST_
UNIT - The cost of one ordinary edit. Every cost in the table below is expressed in these units: cheaper edits (a neighbouring key, a doubled letter, a transposition) cost a fraction of it, edits on the first byte cost more.
- INF
- Sentinel for “unreachable or over budget”.
INFplus any single edit cost still fits in au16.
Functions§
- class
- The class of the byte
bread as the code point U+0000 to U+00FF: the same assymbol_class(b.into()). For ASCII that is bitb & 63. - symbol_
class - Bit that represents the character class of symbol
s(used by subtree signatures). Symbols are Unicode scalar values (seedocs/design/unicode.md). - whole_
units - The weighted
costrounded up to whole units ofCOST_UNIT: 0 stays 0, 1 to 16 is one unit, 17 to 32 two units, and so on.
Type Aliases§
- Cost
- A fixed-point edit cost (16 = one ordinary edit).