powerset | R Documentation |
Calculates and returns the powerset of a Set.
powerset(x, simplify = FALSE)
x |
Set |
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.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.