Language:
Page Info
Tags:
Engine Version:

Difference

Choose your OS:
On this page:

Set_DifferenceNode.png

The Difference node takes the relative difference of items found in two Sets, assigning the difference to a Resultant Set, with the result containing all items found in Set A but not found in Set B. It's important to note that the relative difference between two Sets is not a commutative operation. Visually, the difference between Set A and Set B looks like the following diagram, where Set A contains all of the items that are being preserved.

Set_DifferenceDiagram.png

For illustrative purposes, let's say that you have two string type Sets, Set A and Set B, both of which are defined below.

Set A = {"Item 1", "Item 2", "Item 3", "Item 4", "Item 5"}
Set B = {"Item 4", "Item 5", "Item 6", "Item 7", "Item 8"}

The following table shows you the result, which contains the relative difference between Set A and Set B (symbolically represented as A \ B).

Set A

Set B

Resultant Set (A \ B)

Item 1

Item 4

Item 1

Item 2

Item 5

Item 2

Item 3

Item 6

Item 3

Item 4

Item 7

Item 5

Item 8

Inputs

Pin Location

Name

Description

Set_DifferenceNode_1.png

(In) Exec

Input execution pin.

Set_DifferenceNode_2.png

A

Set A is the starting Set.

Set_DifferenceNode_3.png

B

Set B is the Set of items to remove from Set A.

Outputs

Pin Location

Name

Description

Set_DifferenceNode_4.png

(Out) Exec

Output execution pin.

Set_DifferenceNode_5.png

Result

The Set containing all of the items in Set A, which aren't found in Set B.

Example Usage

Set_DifferenceUsage.png

Footnote

Symbolically, this operation is represented as A \ B = { x | x ∈ A ∧ x ∉ B }, wherein this node is performing a logical AND operation between elements in Set A and elements not in Set B.

Tags