ProductSet class for symbolic product of mathematical sets.

Details

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.

See also

Super classes

set6::Set -> set6::SetWrapper -> ProductSet

Active bindings

length

Returns the number of elements in the object.

Methods

Public methods

Inherited methods

Method new()

Create a new ProductSet object. It is not recommended to construct this class directly.

Usage

ProductSet$new(
  setlist,
  lower = NULL,
  upper = NULL,
  type = NULL,
  cardinality = NULL
)

Arguments

setlist

list of Sets to wrap.

lower

lower bound of new object.

upper

upper bound of new object.

type

closure type of new object.

cardinality

Either an integer, "Aleph0", or a beth number. If NULL then calculated automatically (recommended).

Returns

A new ProductSet object.


Method strprint()

Creates a printable representation of the object.

Usage

ProductSet$strprint(n = 2)

Arguments

n

numeric. Number of elements to display on either side of ellipsis when printing.

Returns

A character string representing the object.


Method contains()

Tests if elements x are contained in self.

Usage

ProductSet$contains(x, all = FALSE, bound = FALSE)

Arguments

x

Set or vector of Sets.

all

logical. If FALSE tests each x separately. Otherwise returns TRUE only if all x pass test.

bound

logical

Returns

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.


Method clone()

The objects of this class are cloneable with this method.

Usage

ProductSet$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.