class
AtCoder::SCC
- AtCoder::SCC
- Reference
- Object
Overview
Implements atcoder::scc_graph.
scc = AtCoder::SCC.new(3_i64)
scc.add_edge(0, 1)
scc.add_edge(1, 0)
scc.add_edge(2, 0)
scc.scc # => [Set{2}, Set{0, 1}]
Defined in:
scc.crConstructors
Instance Method Summary
-
#add_edge(from, to)
Implements atcoder::scc_graph.add_edge(from, to).
-
#adjacencies : Array(Adjacency)
Returns the in/out adjacency lists of each vertex.
-
#scc
Implements atcoder::scc_graph.scc().
- #size : Int64
Constructor Detail
Instance Method Detail
Returns the in/out adjacency lists of each vertex.
Kept for compatibility. It is built on every call, so avoid calling it in hot paths.