Module ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign SubscriptStore NameLoad Index NameLoad NameLoad If CompareEq NameLoad NameLoad body Return NameLoad For NameStore SubscriptLoad NameLoad Index NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad If BoolOpAnd UnaryOpNot SubscriptLoad NameLoad Index NameLoad CompareGt NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad body Assign NameStore Call NameLoad NameLoad BinOpSub NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad If CompareGt NameLoad Num body AugAssignAdd SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad NameLoad AugAssignSub SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad NameLoad Return NameLoad Return Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp BinOpMult ListLoad Num NameLoad comprehension NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Str While CompareGt Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad BinOpMult ListLoad NameLoad NameLoad Num body Pass Return TupleLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad decorator_list
N/A sys setrecursionlimit tryalgo.graph add_reverse_arcs _augment N/A N/A graph capacity flow val u target visit N/A N/A N/A Find an augmenting path from u to target with value at most val N/A N/A visit N/A u True N/A N/A u target N/A N/A val N/A v N/A graph N/A u N/A N/A cuv N/A N/A capacity N/A u N/A v N/A N/A N/A N/A visit N/A v N/A cuv N/A N/A flow N/A u N/A v N/A N/A res N/A min val N/A cuv N/A N/A flow N/A u N/A v N/A delta N/A _augment graph capacity flow res v target visit N/A N/A delta 0 N/A N/A N/A N/A flow N/A u N/A v delta N/A N/A N/A flow N/A v N/A u delta N/A delta N/A 0 N/A ford_fulkerson N/A N/A graph capacity s t N/A N/A N/A Maximum flow by Ford-Fulkerson

    :param graph: directed graph in listlist or listdict format
    :param capacity: in matrix format or same listdict graph
    :param int s: source vertex
    :param int t: target vertex

    :returns: flow matrix, flow value
    :complexity: `O(|V|*|E|*max_capacity)`
     N/A N/A add_reverse_arcs graph capacity N/A n N/A len graph N/A flow N/A N/A N/A 0 n N/A _ N/A range n N/A INF N/A float inf N/A N/A N/A _augment graph capacity flow INF s t N/A N/A False n 0 N/A N/A N/A N/A flow N/A sum N/A flow N/A s N/A