Skip to content

Binary Logical Graph Operators

2start edited this page Jul 9, 2018 · 20 revisions

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

Binary Logical Graph Operators
Combination
Overlap
Exclusion
Equality
VertexFusion

Combination

tbd.


Overlap

Given two graphs, the overlap operator extracts their common vertices and edges resulting in a new LogicalGraph. It is implemented by the overlap() function of the LogicalGraph. The overlap function takes a LogicalGraph as its input and outputs a new LogicalGraph consisting of the common elements in both graphs.

Overlap example

Consider the social graph from our quickstart section.
We use the overlap function to retrieve the common elements in both graphs.

    LogicalGraph n1 = loader.getLogicalGraphByVariable("g1");
    LogicalGraph n2 = loader.getLogicalGraphByVariable("g2");
    LogicalGraph overlap = n2.overlap(n1);

The resulting graph looks as follows:

![Overlap Graph](https://raw.githubusercontent.com/wiki/dbs-leipzig/gradoop/images/overlap-result.png | height=100)

The overlap graph contain all the common elements of both graphs. There are no common vertices in g1 and g2, hence there are no vertices in the overlap graph.


Exclusion

tbd.


Equality

tbd.


VertexFusion

tbd.

Clone this wiki locally