R/utils.R

Defines functions isFuzzyNumber IfInteger

# approximation methods from FuzzyNumbers package

approximationMehodsOutside <- c("Naive","NearestEuclidean","SupportCorePreserving")

# function to check if the parameter is given by the integer

IfInteger <- function(x)
{
  if(is.numeric(x))
  {
    test <- all.equal(x, as.integer(x), check.attributes = FALSE)
    
    if(test == TRUE)
    { return(TRUE) }
    else { return(FALSE) }
  }
  
  else { return(FALSE) }
}


isFuzzyNumber <- function(value)
{
  return(methods::is(value,"FuzzyNumber"))
}

Try the ZEP package in your browser

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

ZEP documentation built on June 23, 2025, 9:07 a.m.