This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Commit 1fd90c8
committed
Remove dead fields and duplicate BFS in report generators
- NetworkReportGenerator: remove 5 unused private edge-type fields
(friendEdges, fsEdges, classmateEdges, strangerEdges, studyGEdges)
that were assigned in the constructor but never read — generate()
already uses the edgesByType map directly.
- NetworkReportGenerator: replace duplicate countComponents() BFS with
existing GraphUtils.findComponents(graph).size(), eliminating ~20
lines of duplicated traversal logic.
- GraphSummarizer: remove 5 unused private edge-type fields that were
only needed to construct GraphStats — use local variables instead.1 parent 9d54235 commit 1fd90c8
2 files changed
Lines changed: 8 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 31 | | |
37 | 32 | | |
38 | 33 | | |
| |||
55 | 50 | | |
56 | 51 | | |
57 | 52 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
65 | 59 | | |
66 | 60 | | |
67 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 37 | | |
43 | 38 | | |
44 | 39 | | |
| |||
60 | 55 | | |
61 | 56 | | |
62 | 57 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | 58 | | |
70 | 59 | | |
71 | 60 | | |
| |||
162 | 151 | | |
163 | 152 | | |
164 | 153 | | |
165 | | - | |
166 | | - | |
| 154 | + | |
| 155 | + | |
167 | 156 | | |
168 | 157 | | |
169 | 158 | | |
| |||
256 | 245 | | |
257 | 246 | | |
258 | 247 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | 248 | | |
283 | 249 | | |
284 | 250 | | |
| |||
0 commit comments