Start to implement K-clustering

This commit is contained in:
2021-02-04 21:39:38 -05:00
parent a13fae6ceb
commit 12f8f2cf43
6 changed files with 18 additions and 1 deletions

10
src/k_clustering.rs Normal file
View File

@@ -0,0 +1,10 @@
use crate::prims::WeightedGraph;
use std::convert::TryInto;
pub fn k_clustering(graph: &WeightedGraph) -> i32 {
for vertex in graph {
println!("{:?}", vertex.edges.len());
}
graph.len().try_into().unwrap()
}