Adding functionality to the EgoFilter #3001
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Current State:
The filter itself:
Gephi has an Ego Network filter which filters the displayed graph according to:
After applying said filter, Gephi shows neighbors at depth k, from the "Ego" node.
The Filter does not consider directed edges losing information.
Desired State:
Have the Ego Network filter consider directed edges, to see nodes connected via outgoing, incoming or any type of edges.
To effectively use the wanted changes 2 major things have to be done:
The filter itself:
The Ego network filter now considers the Directed edges and acts according to following rules:
The filter is able to consider non-directed edges if the user wants it to, keeping the original usability of the filter.
To achieve the desired functionality of the filter some changes must be made to the EgoPanel:
The filter panel:
The filter panel now has following options:
To achieve this I edited the classes
EgoBuilder
andEgoPanel
, alongside with theBundle.properties
,Bundle_de.properties
(for JavaSwing names in german) and finally theegoPanel.form
file due to changes in the UI.All changes of the UI were done in Apache NetBeans and the code was generated automatically to the
EgoPanel
.The filter method in
EgoBuilder
was changed entirely, I used a BFS Algorithm to achieve the wanted behavior.the method is well documented in the code.
To check whether an edge is relevant the method
isRelevant(Node ego, Edge e)
was implemented, I am usingEnums
to differentiate the options of the added drop-down menu.Screenshots for reference:
Default UI:
Translation:
Knoten ID --> Node ID, Tiefe --> Depth, Richtung --> Direction, Inkl. Eigener --> With Self, berücksichtige ungerichtete Kanten --> Consider non directed Edges
Example Graph:
NodeId = A || 0, Depth 1, Direction = Outgoing, withSelf = true, considerNonDirectEdges = false
NodeId = A || 0, Depth 1, Direction = Incoming, withSelf = true, considerNonDirectEdges = false
NodeId = A || 0, Depth 1, Direction = Both, withSelf = true, considerNonDirectEdges = false
NodeId = C || 2, Depth 2, Direction = Incoming, withSelf = true, considerNonDirectEdges = true
Checklist
Added tests?
Added to documentation?