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

Add bellman_ford_path #64

Merged
merged 2 commits into from
May 4, 2023
Merged

Conversation

eriknw
Copy link
Member

@eriknw eriknw commented May 3, 2023

There are several algorithms that return one or more paths, so this PR can help blaze the way to determine how we do this.

I do something different for parent Bellman-Ford by not using UDTs/UDFs. I'm not sure if it's the best way. This also hasn't been benchmarked. YOLO.

Comment on lines +248 to +249
B << select.valuene(B, False)
Indices << indexunary.rowindex(B)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines could be replaced with

Indices(B.V, replace) << indexunary.rowindex(B)

but I think it's clearer in two lines (using masking with replace is kind of ugly). I don't know if there is a performance difference.

@eriknw
Copy link
Member Author

eriknw commented May 4, 2023

YOLO :)

Happy to receive feedback even after merging

@eriknw eriknw merged commit 7dfd65b into python-graphblas:main May 4, 2023
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

Successfully merging this pull request may close these issues.

1 participant