Learn R Programming

set6 (version 0.1.1)

membership: Get Membership of Element in FuzzySet

Description

Returns the membership, i.e. value in [0, 1], of either the given element(s) or all elements in the fuzzy set.

Arguments

element

element or list of element in the set, if NULL returns membership of all elements

Value

Value, or vector of values, in [0, 1]

R6 Usage

$membership(element = NULL)

Details

For FuzzySets this is straightforward and returns the membership of the given element(s), however in FuzzyTuples when an element may be duplicated, the function returns the membership of all instances of the element.

Examples

Run this code
# NOT RUN {
f = FuzzySet$new(1, 0.1, 2, 0.5, 3, 1)
f$membership()
f$membership(2)
# }

Run the code above in your browser using DataLab