R/maximin_cplus.R

Defines functions maximin_cplus

Documented in maximin_cplus

maximin_cplus <- function(design){
  
  X <- as.matrix(design)
  n <- dim(X)[1]
  # To check the experimental region
  if ( min(X)<0 || max(X)>1 ){
    warning("The design is rescaling into the unit cube [0,1]^d.")
    M <- apply(X,2,max)
    m <- apply(X,2,min)
    for (j in 1:dim(X)[2]){
      X[,j] <- (X[,j]-m[j])/(M[j]-m[j])
    }	
  }
  
  val <- maximin_cpp(X)
  return(val)
}

Try the sensitivity package in your browser

Any scripts or data that you put into this service are public.

sensitivity documentation built on Sept. 11, 2024, 9:09 p.m.