algo — C++23 日本語リファレンス GitHub

tree_subtree

関数 · 木の基本関数

template <graph_type G>
std::vector<int> tree_subtree(const G &g, int r = 0);

概要

部分木の大きさを求める

テンプレートパラメータ

名前 説明
G グラフ型(list_graph<T> / csr_graph<T> のいずれでも可)

計算量

関連項目