R/sphere.R

Defines functions funSphere

Documented in funSphere

###################################################################################################
#' Sphere Test Function
#'
#' @param x matrix of points to evaluate with the sphere function. Rows for points and columns for dimension.
#'
#' @return 1-column matrix with resulting function values
#' @examples
#' funSphere(matrix(runif(18),,3))
#' @export
###################################################################################################
funSphere <- function(x)matrix(apply(x,1,function(x)sum(x^2)),,1)
bartzbeielstein/SPOT documentation built on June 13, 2020, 5:58 p.m.