-
Notifications
You must be signed in to change notification settings - Fork 20
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
Move the extend algorithm into the C++ extension #178
Conversation
Timing of extend on 10k ref vs 10k query: |
bool self = true, const int int_offset = 0) { | ||
edge_tuple edges = | ||
generate_all_tuples(num_ref, num_queries, self, int_offset); | ||
return (edges); | ||
} |
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.
You just hate whitespace, don't you?
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.
You need to install the best vs code extension around: https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces
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.
And then once you've accepted that into your life, you can get really pedantic: https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow
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.
Although actually this particular change was courtesy of: https://marketplace.visualstudio.com/items?itemName=xaver.clang-format
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.
(I have a lot of extensions)
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.
I would inevitably manage to install two extensions with conflicting preferences that would infinite loop as soon as I indented a line
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.
Only one small comment - might be slightly clearer to have new_val
be true when there is a substantial increment in the distance, but I appreciate it is of limited importance to the mechanics of the functions where it appears.
This is a good point, and though it works correctly, I've already confused myself once because the name suggests the opposite meaning to what it should be |
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.
Brillant, looks great, works very nicely!
This moves LineageFit.extend to the poppunk_refine extension. The algorithm is similar to that used in sparsifyDists in pp_sketchlib, but works specifically with a combination of sparse and dense matrices. The highest rank is computed, and then lowered to get smaller ranks. Parallelisation supported.