Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
diff docs/algorithm-dinic.description @ 107:1c1985532139
A couple of real pseudocode examples.
Examples are from the Wikipedia.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 04 May 2026 16:57:17 +0200 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/algorithm-dinic.description Mon May 04 16:57:17 2026 +0200 @@ -0,0 +1,11 @@ +// -*- 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
