Skip to content

Commit 347f36d

Browse files
committed
docs(codec): clarify Merge-vs-Delta tie comment per P2 review
https://claude.ai/code/session_01HbqooFZHAjaUtFEzhA1R2u
1 parent 52e44f5 commit 347f36d

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/hpc/codec/rdo.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,11 +381,10 @@ mod tests {
381381

382382
#[test]
383383
fn merge_chosen_when_neighbour_matches_and_lambda_rewards_it() {
384-
// Northern neighbour is Delta(basin=7, δ=20). True δ = 20 → Merge
385-
// reconstructs exactly (distortion 0) at 3 bytes, beating Delta's
386-
// 3 bytes only on the tie-break? Both 3 bytes, both distortion 0.
387-
// Merge is scored after Skip; Skip here has distortion 20 so loses
388-
// at lossless λ. Merge (scored before Delta) wins the 3-byte tie.
384+
// Northern neighbour is Delta(basin=7, δ=20). True δ = 20, so both
385+
// Merge and Delta reconstruct exactly (distortion 0) at 3 bytes —
386+
// an exact cost tie. Skip (2 bytes) has distortion 20 and loses at
387+
// lossless λ. Merge is scored before Delta, so it wins the tie.
389388
let nb = LeafCu::delta(7, 20);
390389
let neighbours = [Some(&nb), None, None, None];
391390
let choice = rdo_select(&ctx(7, 20, neighbours), &RdoConfig::LOSSLESS, None);

0 commit comments

Comments
 (0)