R/sphere.R

sphere <- function(x){
  if (is.matrix(x)) {
    sqrt(rowSums(x^2))
  } else sqrt(sum(x^2))
}
fcampelo/ExpDE documentation built on May 16, 2019, 12:04 p.m.