Skip to content

Avl tree - #1655

Merged
mergify[bot] merged 2 commits into
tskit-dev:mainfrom
jeromekelleher:avl-tree
Sep 6, 2021
Merged

mergify[bot] merged 2 commits into
tskit-dev:mainfrom
jeromekelleher:avl-tree

Conversation

@jeromekelleher

@jeromekelleher jeromekelleher commented Sep 2, 2021 •

Copy link
Copy Markdown
Member

Closes #1640

We don't need much from our AVL tree, so I've implemented Knuths version.

@jeromekelleher
jeromekelleher marked this pull request as draft September 2, 2021 15:59
@jeromekelleher
jeromekelleher force-pushed the avl-tree branch 3 times, most recently from 7162013 to cd9311d Compare September 3, 2021 08:50
@codecov

codecov Bot commented Sep 3, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #1655 (0d3a623) into main (66dbddd) will increase coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head 0d3a623 differs from pull request most recent head 211f662. Consider uploading reports for the commit 211f662 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1655      +/-   ##
==========================================
+ Coverage   93.63%   93.66%   +0.02%     
==========================================
  Files          27       27              
  Lines       23407    23511     +104     
  Branches     1084     1084              
==========================================
+ Hits        21918    22022     +104     
  Misses       1455     1455              
  Partials       34       34              
Flag Coverage Δ
c-tests 91.77% <100.00%> (+0.07%) ⬆️
lwt-tests 93.49% <ø> (ø)
python-c-tests 95.49% <ø> (ø)
python-tests 98.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
c/tskit/core.h 100.00% <ø> (ø)
c/tskit/core.c 97.73% <100.00%> (+0.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 08f7bf5...211f662. Read the comment docs.

@jeromekelleher
jeromekelleher marked this pull request as ready for review September 3, 2021 11:09
@jeromekelleher

Copy link
Copy Markdown
Member Author

This is ready to go in I think. The implementation is bare-bones, but I think it does what we need for the IBD result work. It's not part of the public API so we can change things to make it more general later if we want (i.e., have more general keys).

It's a direct implementation of the version in TAOCP, so we can be confident it's correct and will work as well as any other implementation. The tests are pretty basic, but they're validating the fundamental properties of the data structure and checking all code paths, so there's a high degree of confidence it's in good shape.

@jeromekelleher

Copy link
Copy Markdown
Member Author

@Mergifyio rebase

@mergify

mergify Bot commented Sep 6, 2021

Copy link
Copy Markdown
Contributor

Command rebase: success

Branch has been successfully rebased

@benjeffery benjeffery left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@mergify
mergify Bot merged commit fc2b564 into tskit-dev:main Sep 6, 2021
@jeromekelleher
jeromekelleher deleted the avl-tree branch September 6, 2021 17:27
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.

Dictionary data structures library

2 participants