Public methods
Method equals()
Tests if two sets are equal.
Usage
FuzzyTuple$equals(x, all = FALSE)
Arguments
x
Set or vector of Sets.
all
logical. If FALSE
tests each x
separately. Otherwise returns TRUE
only if all x
pass test.
Details
Two fuzzy sets are equal if they contain the same elements with the same memberships and
in the same order. Infix operators can be used for:
Returns
If all
is TRUE
then returns TRUE
if all x
are equal to the Set, otherwise
FALSE
. If all
is FALSE
then returns a vector of logicals corresponding to each individual
element of x
.
Method isSubset()
Test if one set is a (proper) subset of another
Usage
FuzzyTuple$isSubset(x, proper = FALSE, all = FALSE)
Arguments
x
any. Object or vector of objects to test.
proper
logical. If TRUE
tests for proper subsets.
all
logical. If FALSE
tests each x
separately. Otherwise returns TRUE
only if all x
pass test.
Details
If using the method directly, and not via one of the operators then the additional boolean
argument proper
can be used to specify testing of subsets or proper subsets. A Set is a proper
subset of another if it is fully contained by the other Set (i.e. not equal to) whereas a Set is a
(non-proper) subset if it is fully contained by, or equal to, the other Set.
Infix operators can be used for:
Subset |
< |
Proper Subset |
<= |
Superset |
> |
Returns
If all
is TRUE
then returns TRUE
if all x
are subsets of the Set, otherwise
FALSE
. If all
is FALSE
then returns a vector of logicals corresponding to each individual
element of x
.
Method alphaCut()
The alpha-cut of a fuzzy set is defined as the set
$$A_\alpha = \{x \epsilon F | m \ge \alpha\}$$
where \(x\) is an element in the fuzzy set, \(F\), and \(m\) is the corresponding membership.
Usage
FuzzyTuple$alphaCut(alpha, strong = FALSE, create = FALSE)
Arguments
alpha
numeric in [0, 1] to determine which elements to return
strong
logical, if FALSE
(default) then includes elements greater than or equal to alpha, otherwise only strictly greater than
create
logical, if FALSE
(default) returns the elements in the alpha cut, otherwise returns a crisp set of the elements
Returns
Elements in FuzzyTuple or a Set of the elements.
Method clone()
The objects of this class are cloneable with this method.
Usage
FuzzyTuple$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.