Set VIs and Functions

Owning Palette: Collection VIs and Functions

Requires: Base Development System. This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.

Use the Set VIs and functions to create and manipulate sets.

Palette ObjectDescription
Build SetCreates a set from the input elements. Duplicate elements appear only once in the resulting set.
Collection SizeReturns the number of elements or entries in a collection.
Convert Set To ArrayPlaces the code that you can use to convert a set to an array.
Element of Set?Returns whether an element is a member of a set.
Empty Collection?Returns TRUE if the input collection contains zero elements or entries.
Insert Into SetInserts an element into a set.
Read Set Max & MinReturns the maximum and minimum elements in a set.
Remove From SetRemoves an element from a set.
Set Cartesian ProductComputes the Cartesian product of two sets. The Cartesian product is a set of 2-element clusters which covers all possible combinations of elements from the two sets.
Set ConstantRepresents a set on the block diagram.

You cannot modify the embedded data in a set interactively or programmatically. You can update set data only as a whole through operations such as writing to the set front panel terminal or right-clicking the set and selecting Data Operations»Copy Data or Data Operations»Paste Data.
Set DifferenceComputes the difference of two sets. The difference is the elements from the first set that are not included in the second set.
Set IntersectionComputes the intersection of two sets. The intersection is all the elements that belong to both sets.
Set Symmetric DifferenceComputes the symmetric difference of two sets.
Set UnionComputes the union of two sets. The union is all elements that belong to either of the two sets.