* Fix ty invalid assignment diagnostics
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix unused typing import
* Fix gradient accumulation type handling
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix automatic differentiation gradient dtype handling
---------
Co-authored-by: kadubhumika <kadubhumika@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Clean up the networking_flow directory
- Add networking_flow/README.md covering max-flow / min-cut, with a
file-by-file table and guidance on which algorithm to use.
- minimum_cut.py: add a module docstring with a Wikipedia URL, type
hints, and corner-case doctests; work on a copy so the input graph is
no longer mutated.
- Add dinic.py: Dinic's algorithm (BFS level graph + DFS blocking flow),
adjacency-list based so it handles parallel edges and sparse graphs.
- Add push_relabel.py: the Goldberg-Tarjan push-relabel (preflow) method
with highest-label selection.
Both new algorithms are fully type-hinted, documented with a Wikipedia
reference, and validated by doctests; their output was cross-checked
against ford_fulkerson.py on thousands of random graphs.
* Address review: drop __future__ import, use descriptive names, apply README wording
* Tighten up psf/black and flake8
* Fix some tests
* Fix some E741
* Fix some E741
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>