Module Expr Str Assign NameStore Str ImportFrom alias Import alias identifier Assign NameStore ListLoad Str Str Str Str Str Str ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Str Str Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Raise decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Str Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr IfExp NameLoad BinOpDiv BinOpAdd NameLoad NameLoad NameLoad Call NameLoad Str Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body AugAssignAdd AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return CompareGtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Num decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr body Raise Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Str Assign NameStore ListComp TupleLoad NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr keyword NameLoad BoolOpAnd CompareNotEq NameLoad NameLoad CompareGt Call AttributeLoad NameLoad attr NameLoad NameLoad Num Assign NameStore BoolOpOr BinOpMult Num Call NameLoad GeneratorExp SubscriptLoad NameLoad Index NameLoad comprehension TupleStore NameStore NameStore NameStore NameLoad BoolOpAnd CompareIn NameLoad NameLoad CompareNotEq SubscriptLoad NameLoad Index NameLoad NameLoad Num If Call AttributeLoad NameLoad attr body For TupleStore NameStore NameStore NameStore NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num orelse Assign SubscriptStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad Index Str NameLoad orelse For TupleStore NameStore NameStore NameStore NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad ListLoad NameLoad Assign NameStore Call NameLoad ListLoad NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr body If BoolOpAnd CompareEq SubscriptLoad NameLoad Index Str NameLoad CompareNotIn NameLoad NameLoad body If CompareEq NameLoad NameLoad body Raise Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad GeneratorExp TupleLoad NameLoad Num comprehension NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr GeneratorExp TupleLoad NameLoad SubscriptLoad NameLoad Index Str comprehension TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr CompareGt SubscriptLoad NameLoad Index Str Num Return NameLoad decorator_list
N/A N/A 
Utility classes and functions for network flow algorithms.
 N/A __author__ ysitu <ysitu@users.noreply.github.com> collections deque N/A networkx nx N/A __all__ N/A CurrentEdge Level GlobalRelabelThreshold build_residual_network detect_unboundedness build_flow_dict CurrentEdge N/A object N/A N/A Mechanism for iterating over out-edges incident to a node in a circular
    manner. StopIteration exception is raised when wraparound occurs.
     N/A __slots__ N/A _edges _it _curr __init__ N/A N/A self edges N/A N/A N/A N/A self _edges edges N/A N/A self _edges N/A N/A N/A N/A self _rewind N/A get N/A N/A self N/A N/A N/A N/A self _curr N/A move_to_next N/A N/A self N/A N/A N/A N/A N/A N/A self _curr N/A next N/A self _it N/A N/A N/A StopIteration N/A N/A N/A N/A self _rewind N/A N/A _rewind N/A N/A self N/A N/A N/A N/A self _it N/A iter N/A N/A N/A self _edges items N/A N/A self _curr N/A next N/A self _it N/A N/A Level N/A object N/A N/A Active and inactive nodes in a level.
     N/A __slots__ N/A active inactive __init__ N/A N/A self N/A N/A N/A N/A self active N/A set N/A N/A self inactive N/A set N/A N/A GlobalRelabelThreshold N/A object N/A N/A Measurement of work before the global relabeling heuristic should be
    applied.
     __init__ N/A N/A self n m freq N/A N/A N/A N/A self _threshold N/A freq N/A N/A n m freq N/A float inf N/A N/A self _work 0 N/A add_work N/A N/A self work N/A N/A N/A N/A self _work work N/A is_reached N/A N/A self N/A N/A N/A N/A N/A self _work N/A self _threshold N/A clear_work N/A N/A self N/A N/A N/A N/A self _work 0 N/A N/A build_residual_network N/A N/A G capacity N/A N/A N/A Build a residual network and initialize a zero flow.

    The residual network :samp:`R` from an input graph :samp:`G` has the
    same nodes as :samp:`G`. :samp:`R` is a DiGraph that contains a pair
    of edges :samp:`(u, v)` and :samp:`(v, u)` iff :samp:`(u, v)` is not a
    self-loop, and at least one of :samp:`(u, v)` and :samp:`(v, u)` exists
    in :samp:`G`.

    For each edge :samp:`(u, v)` in :samp:`R`, :samp:`R[u][v]['capacity']`
    is equal to the capacity of :samp:`(u, v)` in :samp:`G` if it exists
    in :samp:`G` or zero otherwise. If the capacity is infinite,
    :samp:`R[u][v]['capacity']` will have a high arbitrary finite value
    that does not affect the solution of the problem. This value is stored in
    :samp:`R.graph['inf']`. For each edge :samp:`(u, v)` in :samp:`R`,
    :samp:`R[u][v]['flow']` represents the flow function of :samp:`(u, v)` and
    satisfies :samp:`R[u][v]['flow'] == -R[v][u]['flow']`.

    The flow value, defined as the total flow into :samp:`t`, the sink, is
    stored in :samp:`R.graph['flow_value']`. If :samp:`cutoff` is not
    specified, reachability to :samp:`t` using only edges :samp:`(u, v)` such
    that :samp:`R[u][v]['flow'] < R[u][v]['capacity']` induces a minimum
    :samp:`s`-:samp:`t` cut.

     N/A N/A N/A G is_multigraph N/A N/A N/A N/A nx NetworkXError MultiGraph and MultiDiGraph not supported (yet). N/A R N/A N/A nx DiGraph N/A N/A N/A R add_nodes_from G N/A inf N/A float inf N/A edge_list N/A N/A u v attr N/A N/A u v attr N/A N/A G edges data True N/A N/A u v N/A N/A N/A attr get capacity inf 0 N/A inf N/A N/A 3 N/A sum N/A N/A attr N/A capacity N/A N/A u v attr edge_list N/A N/A capacity attr N/A N/A attr N/A capacity inf 1 N/A N/A N/A G is_directed N/A N/A N/A u v attr edge_list N/A N/A r N/A min N/A N/A attr get capacity inf inf N/A N/A N/A N/A R has_edge u v N/A N/A N/A N/A R add_edge u v capacity r N/A N/A N/A R add_edge v u capacity 0 N/A N/A N/A N/A N/A R N/A u N/A v N/A capacity r N/A N/A N/A u v attr edge_list N/A N/A r N/A min N/A N/A attr get capacity inf inf N/A N/A N/A R add_edge u v capacity r N/A N/A N/A R add_edge v u capacity r N/A N/A N/A R graph N/A inf inf N/A R N/A detect_unboundedness N/A N/A R s t N/A N/A N/A Detect an infinite-capacity s-t path in R.
     N/A q N/A deque N/A s N/A seen N/A set N/A s N/A inf N/A N/A R graph N/A inf N/A q N/A N/A u N/A N/A q popleft N/A N/A v attr N/A N/A N/A R N/A u items N/A N/A N/A N/A N/A attr N/A capacity inf N/A v seen N/A N/A N/A v t N/A N/A N/A N/A nx NetworkXUnbounded Infinite capacity path, flow unbounded above. N/A N/A N/A seen add v N/A N/A N/A q append v N/A build_flow_dict N/A N/A G R N/A N/A N/A Build a flow dictionary from a residual network.
     N/A flow_dict N/A N/A u G N/A N/A N/A flow_dict N/A u N/A dict N/A N/A v 0 N/A v N/A G N/A u N/A N/A N/A N/A flow_dict N/A u update N/A N/A v N/A attr N/A flow N/A N/A v attr N/A N/A N/A R N/A u items N/A N/A attr N/A flow 0 N/A flow_dict N/A