-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG + 1] MAINT Move heapify_up/heapify_down into PriorityHeap as class methods + COSMITs #7034
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
Conversation
is this still relevant and do you want reviews? |
it's relevant, but let's wait on reviews ;) this is just a place to put a bunch of misc changes. thanks for offering, though! |
+1 for that. Could you revive the PR and make travis pass? Thanks! |
91683fc
to
0c38247
Compare
@raghavrv done, thanks for reminding me about this. |
@@ -240,6 +206,38 @@ cdef class PriorityHeap: | |||
cdef bint is_empty(self) nogil: | |||
return self.heap_ptr <= 0 | |||
|
|||
cdef void heapify_up(self, PriorityHeapRecord* heap, SIZE_t pos) nogil: |
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.
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.
Yeah, I originally moved it in because I made another priorityheap class for use with non-records, but we ended up deciding that was too slow. I do think it is cleaner, though.
gentle ping wrt this? |
<
8000
/tr>
+1 from me another review from @jmschrei? |
This looks fine to me, but I wouldn't mind a quick check from one of you tree loppers. |
I think a +1 from you will suffice :) Merging as most (other) tree loopers are quite bust atm and I've bigger PRs for them ;) |
…ss methods + COSMITs (scikit-learn#7034) * RFC: move heap methods to class and remove trailing spaces * spurious comment to force recythonization of boosting * [ci skip] remove spurious comment * remove trailing whitespace on line * style: fix trailing whitespace in _criterion.pxd * add spurious comments to try to force recythonizing * remove changes for recythonization
…ss methods + COSMITs (scikit-learn#7034) * RFC: move heap methods to class and remove trailing spaces * spurious comment to force recythonization of boosting * [ci skip] remove spurious comment * remove trailing whitespace on line * style: fix trailing whitespace in _criterion.pxd * add spurious comments to try to force recythonizing * remove changes for recythonization
…ss methods + COSMITs (scikit-learn#7034) * RFC: move heap methods to class and remove trailing spaces * spurious comment to force recythonization of boosting * [ci skip] remove spurious comment * remove trailing whitespace on line * style: fix trailing whitespace in _criterion.pxd * add spurious comments to try to force recythonizing * remove changes for recythonization
…ss methods + COSMITs (scikit-learn#7034) * RFC: move heap methods to class and remove trailing spaces * spurious comment to force recythonization of boosting * [ci skip] remove spurious comment * remove trailing whitespace on line * style: fix trailing whitespace in _criterion.pxd * add spurious comments to try to force recythonizing * remove changes for recythonization
…ss methods + COSMITs (scikit-learn#7034) * RFC: move heap methods to class and remove trailing spaces * spurious comment to force recythonization of boosting * [ci skip] remove spurious comment * remove trailing whitespace on line * style: fix trailing whitespace in _criterion.pxd * add spurious comments to try to force recythonizing * remove changes for recythonization
I've seen a lot of misc style / refactoring sort of issues while working on the tree code. Rather than clutter up other PRs with these changes, i figured that i would move them here.
What does this implement/fix? Explain your changes.
heapify_up
andheapify_down
methods to be within thePriorityHeap
structure