Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
view docs/algorithm-dinic.description @ 113:9aea2fd5f037
The \GETS command.
Its output is customizable with the lexer's "gets" option.
It defaults to `←'.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Tue, 05 May 2026 20:51:20 +0200 |
| parents | 1c1985532139 |
| children |
line wrap: on
line source
// -*- coding: utf-8; indent-tabs-mode: nil -*- \ALGORITHM{Dinic's Algorithm} \WITH \INPUT{A network \expr{G = ((V , E), c, s, t)}.} \OUTPUT{An \expr{s–t} flow \expr{f} of maximum value.} \IS \TEXT{1. Set \expr{f(e) = 0} for each \expr{e ∈ E}. 2. Construct \expr{G_L} from \expr{G_f} of \expr{G}. If \expr{\text{dist}(t) = ∞}, stop and output \expr{f}. 3. Find a blocking flow \expr{f\'} in \expr{G_L}. 4. Augment flow \expr{f} by \expr{f\'} and go back to step 2.} \END ALGORITHM
