SetIntersection

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

Bases: odl.set.sets.Set

The intersection of several subsets.

The elements of this set are elements of all the subsets.

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

Attributes
examples

Generator creating name-value pairs of set elements.

sets

The sets of this intersection as a tuple.

Methods

contains_all(self, other)

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

contains_set(self, other)

Test if other is a subset of this set.

element(self[, inp])

Return an element from inp or from scratch.

__init__(self, \*sets)[source]

Initialize a new instance.

Parameters
set1, …, setNSet

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

Examples

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