Raphtory icon indicating copy to clipboard operation
Raphtory copied to clipboard

New Filter projection/API

Open miratepuffin opened this issue 1 year ago • 1 comments

Currently it is very easy to filter the graph in any way a user may want i.e. get nodes which have a degree>10. However if we then ask for the neighbours of these nodes this filter will obviously be ignored.

To enable things such as running a k-core filter and running algorithms on only the resulting graph we need to build a filter projection which will push this filter throughout all functions.

This could possible also affect the history of related nodes and entities - though this may prove quite difficult

This should work in the same manner as a window/layer whereby the underlying graph is not actually modified in any manner.

miratepuffin avatar May 19 '23 18:05 miratepuffin

Some filters/subgraph generators that would be handy for writing algorithms and experimenting:

Self-loop filter (remove all self loops), could be plugged into the motifs algo 😉
Largest connected component filter, if the algorithm requires the network to be connected or something
Egonetwork, return just the neighbours of a vertex and the edges between them.

Would be good to have a filter that takes an input node name and returns a graph of that node and connections between its neighbours https://www.geeksforgeeks.org/ego-graph-using-networkx-in-python/

Taken from #1212 and #560

miratepuffin avatar Feb 15 '24 18:02 miratepuffin