Repository navigation
Conversation
|
Looks good - doesn't this feature belong as a (more general) subgraph view? That is, a subgraph where you specify the edges and/or nodes you want to view. Depending on the application it could be easier to specify inclusion or exclusion. |
|
I wondered about that too. Should they be the same object? (specifying either include or exclude nodes and either include or exclude edges) Or does it make more sense to have one set of objects for exclude and one for include? Would the name Finally, we could have the user provide a |
|
I've been looking at how best to make a SubGraphView interface. Sometimes we want to exclude specific nodes. Other times we want to include only specific nodes. It'd be nice to be able to do either with a single interface. It would not be hard to have the user supply one function for nodes and another for edges. If the function returns True then that node/edge is in the subgraph. Otherwise it isn't. This puts the onus on the user to come up with a function and storage mechanism even for simple cases. Maybe we can supply some helper functions/objects to make that process easier. I'm thinking of the filter function inputs as (Graph, node) and (Graph, edge-tuple) with bool return value. I found a description of filters which might provide a basis for how to make a helper object. Users provide Does this approach seem simple enough to pursue? |
|
I prefer #2523 to this proposal. |
This implements a restricted view on graphs where
hidden_nodesandhidden_edgesdo not appear in the resulting graph. This implementation is read-only though you could change the original graph and the restricted view would update accordingly. At this point you can't update the hidden_nodes and hidden_edges without creating a new view. I might add that feature if I can come up with a good way to do it.Related tickets include:
#762
#1011
#793
#335
and there are probably many other places where this feature has been discussed.