R/Graph.R

Defines functions CalculateMST

CalculateMST <- function(x) {
  x <- as.matrix(dist(x))
  g <- igraph::graph_from_adjacency_matrix(x, mode = "undirected", weighted = "weight")
  igraph::mst(g)
}
MartinLoza/Canek documentation built on Jan. 28, 2024, 7:11 p.m.