Commit e21de44
committed
fix(tests): increase graph size to trigger modular degree heuristic
The test "should use degree heuristic for large graphs with distinct
degrees" was failing with:
expected 'modular' to be 'unconstrained'
Root cause: Test created a 15-node path graph, but the degree
heuristic only activates for graphs with >= 25 nodes (line 171 in
perfect-variants.ts). With 15 nodes, the exhaustive check ran instead,
correctly determining the path graph is modular.
Fix: Increased graph size from 15 to 25 vertices to trigger the
heuristic. The path graph has:
- 2 endpoints with degree 1
- 23 middle vertices with degree 2
- Not all distinct degrees → heuristic returns "unconstrained"
This properly tests the intended behavior: for large graphs without
all distinct degrees, the heuristic returns "unconstrained" rather
than running the expensive exhaustive module check.1 parent 001b3d8 commit e21de44
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
228 | 229 | | |
229 | | - | |
| 230 | + | |
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| |||
0 commit comments