DpqDistance | R Documentation |
DpqDistance
calculates the generalized D(p,q) distance between two fuzzy numbers.
DpqDistance(value1, value2, p = 2, q = 1/2)
value1 |
First fuzzy number. |
value2 |
Second fuzzy number. |
p |
Value of the power (and the the root) applied in the distance calculation. |
q |
Value of the weight for the second fuzzy number (for the first one this weight is calculated as |
The function calculates the generalized D(p,q) distance between two fuzzy numbers value1
and value2
,
where p
is the value of the applied power, and q
is the weight between these two fuzzy numbers.
All of the input values should be given by fuzzy numbers described by classes from FuzzyNumbers
package.
The output is a numerical value (the calculated distance).
library(FuzzyNumbers)
# prepare two fuzzy numbers
A <- TrapezoidalFuzzyNumber(0,1,2,3)
B <- TrapezoidalFuzzyNumber(1,3,4,6)
# calculate the distance
DpqDistance (A,B)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.