sign {Calculator.LR.FNs} | R Documentation |
To distinguish and determining the sign of a LR fuzzy number one can use from this function.
In other words, the function sign
is able to categorize the class of all LR fuzzy numbers into three kinds positive, negative and non of them (non-positive and non negative).
sign(M)
M |
A LR, RL or L fuzzy number |
The "sign" function only return three charactical values: "Positive", "Negative" or "non-positive and non negative".
Abbas Parchami
Left.fun = function(x) { (1-x)*(x>=0)}
M = L(2,4,3)
support(M)
sign(M)
sign( L(5,4,3) )
( sign( L(5,4,3) ) == "Positive" )
## The function is currently defined as
function (M)
{
supp = support(M)
if (supp[1] > 0) {
return(noquote(paste0("Positive")))
}
else {
if (supp[2] < 0) {
return(noquote(paste0("Negative")))
}
else {
return(noquote(paste0("non-positive and non negative")))
}
}
}