Start to implement K-clustering
This commit is contained in:
10
src/k_clustering.rs
Normal file
10
src/k_clustering.rs
Normal 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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user