Repository navigation
Initial ARG traversal indexes for numba - #3256
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3256 +/- ##
==========================================
+ Coverage 89.72% 89.73% +0.01%
==========================================
Files 29 29
Lines 32500 32553 +53
Branches 5949 5961 +12
==========================================
+ Hits 29160 29211 +51
Misses 1894 1894
- Partials 1446 1448 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Is the idea to make a C version of the NumbaParentIndex later, so that C users also have an ARG interface? |
|
It's straightforward to do if someone wants it, but we're not planning to do it now. |
|
Some notes from discussion in person:
|
|
@jeromekelleher I've done the refactoring to simplify the API that we discussed yesterday. I think this might be a good point to stop with the PR and do the traversal work in a subsequent PR? |
jeromekelleher
left a comment
There was a problem hiding this comment.
Yep, looks good. Just need to add O complexity statements to the operations so that people know what's involved. Can we add one for the tree index also, please? (Open an issue for adding this if it's not obvious)
|
|
||
| def child_index(self): | ||
| """ | ||
| Create child index array for finding child edges of nodes. |
There was a problem hiding this comment.
Add a statement on the computational complexity of this task, like
This operation involves a linear pass through the edge table and therefore requires O(num_edges) time.
| def parent_index(self): | ||
| """ | ||
| Create a :class:`ParentIndex` for finding parent edges of nodes. | ||
|
|
There was a problem hiding this comment.
Add a statement on complexity.
This operation involves sorting the edge data by child ID and left coordinate, and therefore requires O(E log E) time, there E is the number of edges.
|
@jeromekelleher Notes on time complexity added. I realised if we dropped the left sort from |
Huh - shall we address this in a follow up? |
I've followed the initial suggestions in #2869
I'm not sure about the part in descendant span where a node is considered to inherit from itself for the whole sequence, but as this is just an example I'm sure we can remove the TODO and leave as is?