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

tree_parent

関数 · 木の基本関数

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

概要

木の頂点の親を求める

テンプレートパラメータ

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

計算量

関連項目