R/HungarianAssignment.R

Defines functions HungarianAssignment

HungarianAssignment <- function(m){
  on.exit(.C("hungarianCleanup", PACKAGE="SynExtend"))
  if (min(m) < 0){
    m <- m - min(m)
  }
  res <- .Call("HungarianAssignment", c(t(m)), dim(m))
  names(res) <- seq_along(res)
  res <- res + 1
  return(res)
}
npcooley/SynExtend documentation built on Nov. 15, 2024, 3:02 p.m.