pub fn prim<E: EdgeTrait>(g: &Graph<Undirected, E>) -> Option<Vec<&E>>where E::Weight: Ord,
Prim法
グラフが連結ならばSomeに包んで最小全域木の辺集合を返す。 非連結ならばNoneを返す。