Skip to content

Commit 5e2d8f7

Browse files
committed
rename
1 parent d78f492 commit 5e2d8f7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/Advanced.Algorithms/Graph/Matching/HopcroftKarp.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ private HashSet<MatchEdge<T>> getMaxBiPartiteMatching(IGraph<T> graph,
4343
while (freeVerticesOnRight.Count > 0)
4444
{
4545
var visited = new HashSet<T>();
46-
var paths = new HashSet<MatchEdge<T>>();
46+
var path = new HashSet<MatchEdge<T>>();
4747

4848
foreach (var vertex in freeVerticesOnRight)
4949
{
50-
var path = dfs(graph,
50+
var currentPath = dfs(graph,
5151
leftToRightMatchEdges, rightToLeftMatchEdges, vertex, default, visited, true);
5252

53-
if (path != null)
53+
if (currentPath != null)
5454
{
55-
union(paths, path);
55+
union(path, currentPath);
5656
}
5757
}
5858

59-
xor(matches, paths, leftToRightMatchEdges, rightToLeftMatchEdges);
59+
xor(matches, path, leftToRightMatchEdges, rightToLeftMatchEdges);
6060

6161
freeVerticesOnRight = bfs(graph, partitions, leftToRightMatchEdges, rightToLeftMatchEdges);
6262
}

0 commit comments

Comments
 (0)