Set

Perform set operations and analyze multiset properties effectively.

Set functions are fundamental for working with collections of elements. Calcul.io provides functions for union, intersection, difference, and other set operations. These functions are crucial for fields like computer science, logic, and database management.

Our set functions enable you to perform accurate and efficient operations on sets. Whether you are analyzing data structures, performing logical operations, or managing databases, Calcul.io offers the set theory tools necessary to achieve precise and reliable results.

setCartesian

Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.

setDifference

Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.

setDistinct

Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.

setIntersect

Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.

setIsSubset

Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.

setMultiplicity

Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.

setPowerset

Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.

setSize

Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.

setSymDifference

Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.

setUnion

Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.

All functions