Learn R Programming

set6 (version 0.1.1)

UniversalSet: Mathematical UniversalSet

Description

The UniversalSet is defined as the Set containing all possible elements.

Value

R6 object of class UniversalSet inheriting from Set.

Constructor

UniversalSet$new(...)

Constructor Arguments

Argument Type Details

Constructor Details

The UniversalSet takes no arguments in construction.

Public Fields

Field Link

class class elements elements length length lower lower upper upper max max min min range range properties properties traits traits type type

Public Methods

Comparison Methods Link contains(x, all = FALSE, bound = NULL) contains equals(x, all = FALSE) equals isSubset(x, proper = FALSE, all = FALSE) isSubset Representation Methods Link strprint(n = 2) strprint print(n = 2) print summary(n = 2) summary

Details

The Universal set is the default universe to all sets, and is the largest possible set. The Universal set contains every single possible element. We denote the Universal set with V instead of U to avoid confusion with the union symbol. The Universal set is also responsible for a few set paradoxes, to resolve these we use the following results: Let \(V\) be the universal set, \(S\) be any non-universal set, and \(0\) the empty set, then

$$V \cup S = V$$ $$V \cap S = S$$ $$S - V = 0$$ $$V^n = V$$ $$P(V) = V$$

See Also

Other sets: ConditionalSet, FuzzySet, FuzzyTuple, Interval, Set, Tuple

Examples

Run this code
# NOT RUN {
u = UniversalSet$new()
print(u)
u$contains(c(1, letters, TRUE, Set$new()), all = TRUE)

# }

Run the code above in your browser using DataLab