This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Commit 4e3c5de
committed
fix: vaccination edge count double-counting + Main.java compile error
Bug 1 — findVaccinationTargets() double-counted shared edges:
The old implementation summed the degrees of all vaccination targets
to compute totalEdgesBlocked. When two adjacent targets shared an
edge, that edge was counted twice — causing edgesBlocked to exceed
the actual number of edges and coverageRatio to exceed 100%.
Example: Star graph A-B, A-C, A-D, A-E (4 edges).
Vaccinating {A (deg=4), B (deg=1)}: old code reported 5 edges
blocked out of 4 total (125% coverage).
Fix: Count distinct edges where at least one endpoint is a target.
Uses graph.getEndpoints() for robustness. Now correctly reports 4/4
(100% coverage) for the same scenario.
Bug 2 — Main.java extra closing brace from refactor commit:
The CategoryRow refactor (45e03d8) left an extra closing brace after
initializeCategoryPanel(), causing all subsequent methods
(initializeToolBar, copyfile, main) to fall outside the class body.
This broke compilation entirely (14 'class, interface, or enum
expected' errors).1 parent 6eeab81 commit 4e3c5de
2 files changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
364 | 382 | | |
365 | 383 | | |
366 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2308 | 2308 | | |
2309 | 2309 | | |
2310 | 2310 | | |
2311 | | - | |
2312 | 2311 | | |
2313 | 2312 | | |
2314 | 2313 | | |
| |||
0 commit comments