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

[Q] What is the optimal to get a list of neighbors restricted to a color? #55

Open
lrvdijk opened this issue Dec 8, 2021 · 0 comments

Comments

@lrvdijk
Copy link

lrvdijk commented Dec 8, 2021

Hi, quick question: what would be optimal way to get a list of neighbors of a node, restricting to neighbors associated with one or more given colors?

I have an initial implementation here: https://github.com/broadinstitute/pyfrost/blob/b0d6606dc20ef8b692e91df6dfed25dc40f072b5/src/pyfrostcpp/Neighbors.h

Profiling of a tool I'm working showed that it spent most of its time in one of above functions. While this can partly be explained by the fact that we're doing a whole lot of navigating through the graph, any further optimization of this function would be appreciated. And although I think I understand how to access colors and how they're stored, I might be confused and using the API incorrectly.

If you have any optimization suggestions, that would be much appreciated! Thanks!

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

No branches or pull requests

1 participant