Replace Tholder::Weighted(Vec<Vec<(u64, u64)>>) with a leaner / borrow-capable representation to cut allocation, and promote a proper satisfied_by(indices: &[u32]) -> bool method onto the type.
Why
The current weighted representation is a nested Vec<Vec<_>> — two heap allocations per threshold. K1 (#87) implements weighted satisfaction in keri-rs by matching the public enum (no cesr change) and lives with the representation as-is. This card owns the representation fix and moves threshold satisfaction behind the primitive that owns it (encapsulation).
Scope
- Leaner representation (e.g. flattened clauses + boundaries, or
Cow/inline storage) — no arbitrary cap.
Tholder::satisfy(count) today returns false for weighted (a stub); replace with satisfied_by(indices) handling both Simple and Weighted with exact rational arithmetic (checked, no floats).
- Migrate K1's keri-rs satisfaction logic to call the new method.
Notes
- Break on
Tholder called out in CHANGELOG.
Spawned from #87 (K1) design, 2026-07-05.
Replace
Tholder::Weighted(Vec<Vec<(u64, u64)>>)with a leaner / borrow-capable representation to cut allocation, and promote a propersatisfied_by(indices: &[u32]) -> boolmethod onto the type.Why
The current weighted representation is a nested
Vec<Vec<_>>— two heap allocations per threshold. K1 (#87) implements weighted satisfaction inkeri-rsby matching the public enum (nocesrchange) and lives with the representation as-is. This card owns the representation fix and moves threshold satisfaction behind the primitive that owns it (encapsulation).Scope
Cow/inline storage) — no arbitrary cap.Tholder::satisfy(count)today returnsfalsefor weighted (a stub); replace withsatisfied_by(indices)handling bothSimpleandWeightedwith exact rational arithmetic (checked, no floats).Notes
Tholdercalled out in CHANGELOG.Spawned from #87 (K1) design, 2026-07-05.