ProductSet class for symbolic product of mathematical sets.
set6::Set -> set6::SetWrapper -> ProductSet
lengthReturns the number of elements in the object.
new()Create a new ProductSet object. It is not recommended to construct this class directly.
ProductSet$new( setlist, lower = NULL, upper = NULL, type = NULL, cardinality = NULL )
setlistlist of Sets to wrap.
lowerlower bound of new object.
upperupper bound of new object.
typeclosure type of new object.
cardinalityEither an integer, "Aleph0", or a beth number. If NULL then calculated automatically (recommended).
A new ProductSet object.
strprint()Creates a printable representation of the object.
ProductSet$strprint(n = 2)
nnumeric. Number of elements to display on either side of ellipsis when printing.
A character string representing the object.
contains()Tests if elements x are contained in self.
ProductSet$contains(x, all = FALSE, bound = FALSE)
alllogical. If FALSE tests each x separately. Otherwise returns TRUE only if all x pass test.
boundlogical
If all == TRUE then returns TRUE if all x are contained in self, otherwise FALSE.
If all == FALSE returns a vector of logicals corresponding to the length of x, representing
if each is contained in self. If bound == TRUE then an element is contained in self if it
is on or within the (possibly-open) bounds of self, otherwise TRUE only if the element is within
self or the bounds are closed.
clone()The objects of this class are cloneable with this method.
ProductSet$clone(deep = FALSE)
deepWhether to make a deep clone.
The purpose of this class is to provide a symbolic representation for the product of sets that cannot be represented in a simpler class. Whilst this is not an abstract class, it is not recommended to construct this class directly but via the set operation methods.
Set operations: setunion, setproduct, setpower, setcomplement, setsymdiff, powerset, setintersect
Other wrappers:
ComplementSet,
ExponentSet,
PowersetSet,
UnionSet