问题描述
我试图找到一个高效的C ++区间树实现(最有可能基于红黑树)无病毒或限制性许可证。任何指针到一个干净的轻便独立实施?对于使用情况下,我有一点,设定的时间间隔被称为在一开始(中会有说万美元),我希望能够快速获得间隔重叠给定的时间间隔的列表。因此,一旦建成将不会改变树 - 只需要快速查询
I'm trying to find an efficient C++ interval tree implementation (mostly likely based on red black trees) without a viral or restrictive license. Any pointers to a clean lightweight standalone implementation? For the use case I have in mind, the set of intervals is known at the outset (there would be say a million) and I want to be able to quickly obtain a list of intervals that overlap a given interval. Thus the tree once built will not change -- just needs rapid queries.
推荐答案
我用C编写的基于模板的区间树实现++的。 MIT许可。享受。
I've written a template-based interval tree implementation in C++, https://github.com/ekg/intervaltree. MIT license. Enjoy.
这篇关于发现C ++区间树算法实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!