-
Notifications
You must be signed in to change notification settings - Fork 304
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
Fix bug Random Walk in array sizes #2089
Fix bug Random Walk in array sizes #2089
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Codecov Report
@@ Coverage Diff @@
## branch-22.04 #2089 +/- ##
================================================
+ Coverage 73.59% 73.64% +0.04%
================================================
Files 156 156
Lines 10332 10332
================================================
+ Hits 7604 7609 +5
+ Misses 2728 2723 -5
Continue to review full report at Codecov.
|
@gpucibot merge |
Random walk implementation returns a list of paths (vertex ids) and a list of edge weights for the edges on those paths.
@betochimas discovered that the size of the returned arrays is the same, even though the contents are different sizes. In his example, if the return path contains one path:
[ 0, 1, 3, 5 ]
it returns a weights array with 4 elements[0.1, 2.1, 7.2, ???]
even though only the first three elements are valid. The weights are edge weights, the path[0,1,3,5]
only has 3 edges. The first 3 elements in the returned array are correct. Interpreting the results as intended will never reference that value. However the sizes should be correct.This PR fixes the initialization of the arrays to the correct size, which seems to correct the bug.