Set
Research set theory.
are sets ordered (index) or unordered?
functions
- union
- intersects
- difference
- is sub / super set
- add / remove (join/disjoin?)
- contains
- iterator
Set Operators
Set Theory? Set, intersect, union, subset, superset, powerset, (relative) complement, symmetric difference, membership, cardinality, ordered pair, cartesian product, wellknown sets (natural, integer, rational, real, complex).
Operations
Operator | Fn Name | Description |
---|---|---|
| |
Union | union sets (duplicates overwritten) |
& |
Intersection | intersection sets (only shared elements) |
&~ |
Difference | difference sets (left without right) |
~& |
Difference | difference sets (right without left) |
~ |
Difference | symmetric difference (only unique elements) |
Comparison
Operator | Fn Name | Description |
---|---|---|
= |
Equal | Exact equality |
<> |
NotEqual | Exact inequality |
=< |
SubSetOrEqual | left is a subset of right or equal |
>= |
SuperSetOrEqual | left is a superset of right or equal |
< |
SubSet | left is subset of right |
> |
SuperSet | left is a superset of right |
in |
Contains | an element is contained in set |
not in |
NotContains | an element is not contained in set |
Arithemtic
Is this even a thing?
Operator | Fn Name | Description |
---|---|---|
+ |
AddSet | Add each element of the sets together to form a new set |
- |
AddSet | Subtract each element of the sets from each other to form a new set |
etc…