class

AtCoder::MaxFlow

Inherits Reference / Object

Implements atcoder::mf_graph. Cap is always Int64.

mf = AtCoder::MaxFlow.new(3)
mf.add_edge(0, 1, 3)
mf.add_edge(1, 2, 1)
mf.add_edge(0, 2, 2)
mf.flow(0, 2) # => 3

Constructors

new(size : Int64)
Source

Instance methods

add_edge(from, to, capacity)

Implements atcoder::mf_graph.add_edge(from, to, capacity).

Source
adjacencies

Adjacency list

Source
change_edge

FIXME: Unimplemented

Source
depths
Source
edges

FIXME: Unimplemented

Source
flow(start, target)

Implements atcoder::mf_graph.flow(start, target).

Source
get_edge

FIXME: Unimplemented

Source
min_cut

FIXME: Unimplemented

Source
size

Number of nodes

Source
visit_counts

Number of visited adjacencies for each nodes

Source

Nested types