This class should not be constructed directly. Parent class to SetWrappers.
Wrappers in set6 are utilised to facilitate lazy evaluation and symbolic representation.
Each operation has an associated wrapper that will be returned if simplify = FALSE or if the
result would be too complex to return as a simple Set. Wrappers have an identical interface
to Set. Their primary advantage lies in a neat representation of any set composition (the
result of an operation) and the ability to query the set contents without ever directly
evaluating the set elements.
set6::Set -> SetWrapper
wrappedSetsReturns the list of Sets that are wrapped in the given wrapper.
new()Create a new SetWrapper object. It is not recommended to construct this class directly.
SetWrapper$new( setlist, lower = NULL, upper = NULL, type = NULL, class = NULL, cardinality )
A new SetWrapper object.
equals()Tests if x is equal to self.
SetWrapper$equals(x, all = FALSE)
If all == TRUE then returns TRUE if all x are equal to self, otherwise FALSE.
If all == FALSE returns a vector of logicals corresponding to the length of x, representing
if each is equal to self.
isSubset()Tests if x is a (proper) subset of self.
SetWrapper$isSubset(x, proper = FALSE, all = FALSE)
xxany. Object or vector of objects to test.
properlogical. If TRUE tests for proper subsets.
alllogical. If FALSE tests each x separately. Otherwise returns TRUE only if all x pass test.
alllogical. If FALSE tests each x separately. Otherwise returns TRUE only if all x pass test.
If all == TRUE then returns TRUE if all x are (proper) subsets of self, otherwise FALSE.
If all == FALSE returns a vector of logicals corresponding to the length of x, representing
if each is a (proper) subset of self.
clone()The objects of this class are cloneable with this method.
SetWrapper$clone(deep = FALSE)
deepWhether to make a deep clone.