constellation-app / constellation

A graph-focused data visualisation and interactive analysis application.
https://constellation-app.com
Apache License 2.0
386 stars 58 forks source link

Layers View: Fix Union functionality and add Intersection functionality #2174

Closed OrionsGuardian closed 2 months ago

OrionsGuardian commented 2 months ago

Prerequisites

Description of the Change

The Layers View now has the option of choosing between Union mode and Intersection mode.

The functionality to perform a Union between selected layers has been corrected. New functionality to perform an Intersection has now been implemented.

Alternate Designs

It may be possible to use bit masking and bit shifting to achieve the same result, but it adds unnecessary complexity.

Why Should This Be In Core?

Union and Intersection are standard functions to perform between data sets.

Benefits

Improved functionality.

Verification Process

Create a new graph Open the Layers View Add layers to reach a total of 4 layers.

TEST with UNION mode selected ...

TEST with INTERSECTION mode selected ...

Also need to test with queries defined in the layer. Open/Expand the Layer 3 segment. Add the Vertex Query: Label contains "1" This will make Vertex#1 be treated as though it also belongs to layer 3. So it will now be included in the nodes shown if you select only layers 3 and 4.

Applicable Issues

2170

antares1470 commented 2 months ago

Does this fix also address #1582 and/or #809?

OrionsGuardian commented 2 months ago

Does this fix also address #1582 and/or #809?

Yes for both ... except that it does not move Named Selection functionality into the Layers View (nor should it be moved).

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
83.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud