Calculate a Set's Powerset
Calculates and returns the powerset of a Set.
powerset(x, simplify = FALSE)
x |
|
simplify |
logical, if |
A powerset of a set, S, is defined as the set of all subsets of S, including S itself and the empty set.
Other operators:
setcomplement()
,
setintersect()
,
setpower()
,
setproduct()
,
setsymdiff()
,
setunion()
# simplify = FALSE is default powerset(Set$new(1, 2)) powerset(Set$new(1, 2), simplify = TRUE) # powerset of intervals powerset(Interval$new()) # powerset of powersets powerset(powerset(Reals$new())) powerset(powerset(Reals$new()))$properties$cardinality
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.