Skip to content
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

Add RankedTree #94

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add RankedTree #94

wants to merge 4 commits into from

Conversation

fgreen
Copy link
Contributor

@fgreen fgreen commented Mar 23, 2017

I didn't end up using this, but it's fairly complete and might be useful later. I'm not sure if it's ready to go into master. Overhead seems high compared to flat arrays so I'm a little worried that just using O(N) operations on std::vector might outperform O(log(N)) operations on RankedTree for relatively large N. I'd need to do some benchmarking to figure out what that value is.

}
result.max_height = 1 + max(l_stats.max_height, r_stats.max_height);
GEODE_ASSERT(2*result.black_height >= result.max_height); // Should have at least every other link black
GEODE_ASSERT(result.total_size <= 1<<result.max_height);
Copy link
Contributor

Choose a reason for hiding this comment

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

typo?

@o8ruza8o
Copy link
Contributor

ranked tree test dumps core -- do not merge

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.

2 participants