mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
fix: update Sidon tests for Mian-Chowla API (68/68 pass)
This commit is contained in:
parent
0c176b6e52
commit
d956ac7583
1 changed files with 9 additions and 4 deletions
|
|
@ -328,13 +328,18 @@ def test_sidon():
|
|||
|
||||
# Edge cases
|
||||
report("assign_sidon_slots(0) = []", bs.assign_sidon_slots(0) == [])
|
||||
report("assign_sidon_slots(1) = [seed]", bs.assign_sidon_slots(1) == [42])
|
||||
report("assign_sidon_slots(1) = [1]", bs.assign_sidon_slots(1) == [1])
|
||||
|
||||
# Reproducibility
|
||||
s1 = bs.assign_sidon_slots(15, seed=100)
|
||||
s2 = bs.assign_sidon_slots(15, seed=100)
|
||||
# Reproducibility (deterministic — no seed needed for Mian-Chowla)
|
||||
s1 = bs.assign_sidon_slots(15)
|
||||
s2 = bs.assign_sidon_slots(15)
|
||||
report("sidon is deterministic", s1 == s2)
|
||||
|
||||
# Method comparison
|
||||
p2 = bs.assign_sidon_slots(8, 'powers_of_2')
|
||||
mc = bs.assign_sidon_slots(8, 'greedy_optimal')
|
||||
report("Mian-Chowla denser than powers_of_2", max(mc) < max(p2))
|
||||
|
||||
|
||||
# ── 8. Soliton Search ────────────────────────────────────────────────────────
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue