centroid_decomposition_par
関数 · 重心分解
template <graph_type G>
std::vector<int> centroid_decomposition_par(const G &g);
概要
重心分解木の親配列だけを返す簡易版。
テンプレートパラメータ
| 名前 | 説明 |
|---|---|
G |
グラフ型(list_graph<T> / csr_graph<T> のいずれでも可) |
パラメータ
| 名前 | 説明 |
|---|---|
g |
木 |
戻り値
std::vector<int> 重心分解木における各頂点の親(根は -1)
計算量
- $O(n\log n)$
関連項目
centroid_decomposition— 重心分解