SetUnion

class odl.set.sets.SetUnion(*sets)[source]

Bases: odl.set.sets.Set

The union of several subsets.

The elements of this set are elements of at least one of the subsets.

This is a lazy union, i.e. there is no intelligence and the set is literally stored as the union of its subsets.

Attributes
examples

Generator creating name-value pairs of set elements.

sets

The sets of this union as a tuple.

Methods

contains_all(other)

Test if all elements in other are contained in this set.

contains_set(other)

Test if other is a subset of this set.

element([inp])

Create a new element.

__init__(*sets)[source]

Initialize a new instance.

Parameters
set1, …, setNSet

The sets whose union should be taken. Any duplicates are ignored.

Examples

>>> reals, complexnrs = odl.RealNumbers(), odl.ComplexNumbers()
>>> union = odl.SetUnion(reals, complexnrs)