-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
neighbors #32
Comments
Agree this would be nice. This sounds like the higher-order version of an egonet, no? So perhaps we can have |
I like this idea! I also tried to do something similar in another repo of mine (line 126). I would vote to create a dedicated function for this initially, and then if it becomes clear that we can have a single function, then that's great. Renaming to follow your convention is cool with me as well! |
To move this forward we need a consensus on the name. Current alternatives are:
Please vote! |
Obviously, let's start a third option :D
What do you think? |
Our reasoning to call it |
In that case I would also suggest a Also, I think returning the edges a node is part of (its membership) vs returning the edges it is a part of but with that node removed are sufficiently different that they could be different methods. So this would leave suggestion number 3 as implementing ....which perhaps seems like overkill? Not sure |
Perhaps a good compromise is to implement only two functions: |
I was thinking that, when doing simulations (particularly for games), it is very useful to have the neighbors of a node divided by hyperedge. To explain better, here's what the current
neighbors
function returns:which is basically the neighbors in the graph projection of H. What I was imagining is actually a higher-order neighbor function that returns
{[1], [3, 4]}
. This is extremely useful in loops when you want to scroll over the hyperedges attached to a node and then the neighbors in those.Do you think something like this could be integrated into the current
neighbors
function? Or maybe two different ones? In my old code I hadH.graph_neighbors()
andH.neighbors()
.The text was updated successfully, but these errors were encountered: