Skip to content

Commit 01f570b

Browse files
Fix upper bound assertions to use strict inequality
Change mu_tilde_floyd assertions from <= to < to match the API guarantee that μ̃ < μ + λ (strict inequality) for floyd_partial. Co-authored-by: samueltardieu <[email protected]>
1 parent 2ee8be4 commit 01f570b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/cycle_detection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ fn test_longer_cycle() {
9595

9696
// Mu_tilde should be valid upper bounds
9797
assert!(mu_floyd <= mu_tilde_floyd);
98-
assert!(mu_tilde_floyd <= mu_floyd + lam_floyd);
98+
assert!(mu_tilde_floyd < mu_floyd + lam_floyd);
9999
assert!(mu_brent <= mu_tilde_brent);
100100
}
101101

@@ -131,6 +131,6 @@ fn test_short_cycle_large_mu() {
131131

132132
// Mu_tilde should be valid upper bounds
133133
assert!(mu_floyd <= mu_tilde_floyd);
134-
assert!(mu_tilde_floyd <= mu_floyd + lam_floyd);
134+
assert!(mu_tilde_floyd < mu_floyd + lam_floyd);
135135
assert!(mu_brent <= mu_tilde_brent);
136136
}

0 commit comments

Comments
 (0)