simplify: Simplify a fuzzy number

View source: R/simplify.R

simplifyR Documentation

Simplify a fuzzy number

Description

Simplify a fuzzy number of class fzn or a fuzzy array of class fzarray. It eliminates unnecessary alpha-cuts.

Usage

simplify(x,
               abstol = 1e-6)

Arguments

x

A fuzzy number of class fzn or a fuzzy array of class fzarray.

abstol

Absolute tolerance for simplifying. By default, it is 1e-6.

Value

It returns a fuzzy number of class fzn or a fuzzy array of class fzarray.

Examples

x <- fzn(alpha = c(0, 0.2, 0.5, 0.8, 1),
         l = c(-1, 0, 1, 2, 3),
         u = c(8, 7, 6, 5, 4),
         interp = "approx")
x2 <- simplify(x)
xx <- fzn(alpha = c(0, 0.2, 0.5, 0.8, 1),
         l = c(-1, 0, 1, 2, 3),
         u = c(8, 7, 6, 5, 4),
         interp = "spline")
xx2 <- simplify(xx)
# For a sufficiently large abstol, it returns a trapezoidal (or triangular) fuzzy number:
x3 <- simplify(x, abstol = 0.25)


rbensua/fuzzyr documentation built on May 20, 2023, 7:11 a.m.