Skip to content

Commit da9f3dc

Browse files
Copilotsteffenaxer
andauthored
Fix HTML entity in javadoc and document getToNodeIndex bounds safety
Agent-Logs-Url: https://github.com/steffenaxer/matsim-libs/sessions/f12211e2-7881-40d3-83fd-84658b6cec65 Co-authored-by: steffenaxer <26229392+steffenaxer@users.noreply.github.com>
1 parent 7995a96 commit da9f3dc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

matsim/src/main/java/org/matsim/core/router/speedy/InertialFlowCutter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* <li><b>FM refinement</b>: Fiduccia&ndash;Mattheyses local search minimises
4949
* the edge cut of the underlying bipartition, using a bucket linked-list
5050
* for O(1) max-gain lookup. Up to 5 passes until fixpoint.</li>
51-
* <li><b>Max-flow refinement</b>: Dinic&apos;s algorithm on a node-split flow
51+
* <li><b>Max-flow refinement</b>: Dinic&rsquo;s algorithm on a node-split flow
5252
* network finds the minimum vertex separator between the two partition
5353
* sides. Each internal node is split into v_in/v_out with capacity 1;
5454
* original edges have capacity &infin;.</li>
@@ -1571,6 +1571,8 @@ private void buildSymmetricAdjacency() {
15711571

15721572
int[] degree = new int[n];
15731573
SpeedyGraph.LinkIterator outLI = graph.getOutLinkIterator();
1574+
// getToNodeIndex() always returns a valid index in [0, nodeCount) because
1575+
// SpeedyGraph only stores links whose endpoints are registered nodes.
15741576
for (int node = 0; node < n; node++) {
15751577
outLI.reset(node);
15761578
while (outLI.next()) {

0 commit comments

Comments
 (0)