Hi
Does anyone know how to perform Set operations in grasshopper. Understanding a list as a Set the following operations could be performed.
Union of the sets
A and
B,
denoted
A ∪ B, is the set of
all objects that are a member of
A,
or
B, or both. The union of
{1, 2, 3} and
{2, 3, 4}
is the set
{1, 2, 3, 4}.
Intersection of the sets
A and
B,
denoted
A ∩ B, is the set of
all objects that are members of both
A
and
B. The intersection of
{1, 2, 3} and
{2, 3, 4}
is the set
{2, 3}set difference of
U and
A, denoted
U
\ A. The complement of
{1,2,3}
relative to
{2,3,4} is
{4} , while, conversely, the complement of
{2,3,4} relative to
{1,2,3}
is
{1}Symmetric difference of sets
A and
B
is the set of all objects that are a member of exactly one of
A and
B
(elements which are in one of the sets, but not in both). For instance,
for the sets
{1,2,3} and
{2,3,4} , the symmetric difference set is
{1,4} . It is the set difference of the union and
the intersection,
(A ∪ B) \ (A
∩ B).
Cartesian product of
A and
B,
denoted
A × B, is the set
whose members are all possible ordered
pairs
(a,b) where
a is a member of
A
and
b is a member of
B.
Power
set of a set
A is the set
whose members are all possible subsets of
A.
For example, the power set of
{1, 2} is
{ {}, {1}, {2}, {1,2} }This is a link to Set theory explanation
http://en.wikipedia.org/wiki/Set_theoryThanks