-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Several algorithms modify the graph they are passed. Specifically they relabel nodes and edges. This is a pretty serious issue since it is not an expected behavior for an algorithm to just randomly rename things.
Currently this affects:
- K-truss
- Local clustering coefficient
You can search for my TODOs with: https://github.com/KatanaGraph/katana/search?q=%22Don%27t+mutate+the+users+topology%22
The long term solution to this is complex because it will require something like this (as pseudo-code; these functions don't exist.):
# Create our working copy of the graph
working_pg = pg.Copy()
# Relabel nodes and edges as needed
permutation = RelabelThings(working_pg)
# Run the actual algorithm
RunAlgorithm(working_pg, output_properties)
# Copy the output properties back to the original graph, reverting the permutation.
pg.AddProperties(PermuteProperties(working_pg, output_properties, permutation))Though as RDGs mature, the ideal would be having a lazily constructed relabel of the graph that is created and then cached between algorithm runs. We would still need some support for moving/reordering properties between different relabels of graphs.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working