Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Flomzey
Copy link

@Flomzey Flomzey commented Jul 11, 2025

Description

Current State:

The filter itself:

Gephi has an Ego Network filter which filters the displayed graph according to:

  • Starting Node (Ego)
  • Depth
  • Include Self

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:

  • Outgoing: the filter only considers edges that point away from the Ego node.
  • Incoming: the filter only considers edges that point to the Ego node.
  • Both: the filter considers incoming and outgoing edges

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:

  • No OK button the filter ego updates on input.
  • No depth drop-down the user is able to customize the depth beyond 3 for bigger graphs. to show the maximum amount of edges the field is kept empty.
  • Direction drop-down menu to select {Incoming, Outgoing, Both}
  • Checkbox for self is kept.
  • Checkbox for consideration of non directed graphs. (default true, as in previous behavior)

To achieve this I edited the classes EgoBuilder and EgoPanel, alongside with the Bundle.properties, Bundle_de.properties(for JavaSwing names in german) and finally the egoPanel.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 using Enums to differentiate the options of the added drop-down menu.

Screenshots for reference:

Default UI:
image
Translation:

Knoten ID --> Node ID, Tiefe --> Depth, Richtung --> Direction, Inkl. Eigener --> With Self, berücksichtige ungerichtete Kanten --> Consider non directed Edges

Example Graph:
image

NodeId = A || 0, Depth 1, Direction = Outgoing, withSelf = true, considerNonDirectEdges = false

image

NodeId = A || 0, Depth 1, Direction = Incoming, withSelf = true, considerNonDirectEdges = false

image

NodeId = A || 0, Depth 1, Direction = Both, withSelf = true, considerNonDirectEdges = false

image

NodeId = C || 2, Depth 2, Direction = Incoming, withSelf = true, considerNonDirectEdges = true

image

Checklist

  • Merged with master beforehand

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed

Added to documentation?

  • 👍 README.md
  • 👍 API Changes
  • 👍 Additional documentation in docs
  • 👍 Relevant code documentation
  • 🙅 no, because they aren’t needed

@Flomzey Flomzey changed the title Adding_functionality_to_the_EgoFilter Adding functionality to the EgoFilter Jul 14, 2025
@mbastian mbastian added this to the 0.11.0 milestone Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants