Skip to content
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

Network: add support for finding degrees for nodes #239

Closed
d-callan opened this issue Jan 24, 2024 · 2 comments · Fixed by #244
Closed

Network: add support for finding degrees for nodes #239

d-callan opened this issue Jan 24, 2024 · 2 comments · Fixed by #244

Comments

@d-callan
Copy link
Contributor

we may want to do things like sort a bipartite networks nodes based on degree, and to do that we have to actually know the degree. populating this could be a bit hard to do and maintain perf, so its possible we might want to introduce a method to finds degrees for nodes as needed. alternatively, we could add degree as a slot on the Node class and populate it on initialization of the Network, if we can do it well and quickly.

@d-callan
Copy link
Contributor Author

we might also need to be able to get weighted degree lists

@asizemore
Copy link
Member

If we're really going to do network analysis things at a later date, one of the most basic starting points is looking at the (weighted) degree distribution. To me that suggests we have a method that returns the degrees in a vector so we can go make a histogram. However, ordering or sizing nodes by degree suggests each node should have a slot for degree and weightedDegree. Probably that means that we start by adding the slots and eventually we add a method that just grabs all this info and returns it as a vector...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants