Skip to content

Binary Graph Collection Operators

Timo edited this page Jul 26, 2018 · 3 revisions

This section provides an overview of binary graph collection operators, which consume two GraphCollections as input.

Binary Graph Collection Operators
Union
Intersection
Difference
Equality

Union

Given two collections, the union operator creates a GraphCollection that includes all logical graphs of both input collections. Graph equality is based on their identifiers.

Method Description
union Returns the union of both GraphCollections.

Union example

TBD

Intersection

Given two collections, the intersection operator creates a GraphCollection that includes all logical graphs that exist in both input collections. Graph equality is based on their identifiers.

Method Description
intersect Returns the intersection of both GraphCollections.
intersectWithSmallResult Returns the intersection of both GraphCollections. Alternate implementation that works faster if the other GraphCollection is small (e.g. fits in the workers main memory).

Intersection example

TBD

Difference

Given two collections, the difference operator creates a GraphCollection that includes all logical graphs that are contained in that collection but not in the other. Graph equality is based on their identifiers.

Method Description
difference Returns the difference of both GraphCollections.
differenceWithSmallResult Returns the difference of both GraphCollections. Alternate implementation that works faster if the intermediate result (list of graph identifiers) is small (e.g. fits in the workers main memory).

Difference example

TBD

Equality

Given two collections, the equality operator determines whether they are equal. The operator is implemented by the GraphCollection. The equality operator takes another GraphCollection as its input and outputs a DataSet<Boolean> that contains a single boolean value.

Method Description
equalsByGraphIds Compares IDs of the graph heads of the GraphCollections for equality.
equalsByGraphElementIds Compares IDs of the vertices and edges of the GraphCollections for equality.
equalsByGraphElementData Compares data of the vertices and edges of the GraphCollections for equality.
equalsByGraphData Compares data of the vertices, edges and graph heads of the GraphCollections for equality.

Equality example

TBD

Clone this wiki locally