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