(label: number)
| 146 | links.set(label, (links.get(label) ?? 0) + 1); |
| 147 | } |
| 148 | const score = (label: number) => (links.get(label) ?? 0) - 1.25 * count * totals[label]! / twiceEdges; |
| 149 | let chosen = current, best = score(current); |
| 150 | for (const candidate of links.keys()) { |
| 151 | const next = score(candidate); |