kruskal
関数 · クラスカル法
template <weighted_graph_type G>
std::vector<graph_edge_t<G>> kruskal(const G &g);
概要
クラスカル法
テンプレートパラメータ
| 名前 | 説明 |
|---|---|
G |
重み付きグラフ型(list_graph<T> / csr_graph<T> のいずれでも可) |
計算量
- $O(E\log E)$
関数 · クラスカル法
template <weighted_graph_type G>
std::vector<graph_edge_t<G>> kruskal(const G &g);
クラスカル法
| 名前 | 説明 |
|---|---|
G |
重み付きグラフ型(list_graph<T> / csr_graph<T> のいずれでも可) |