发现C ++区间树算法实现 [英] Finding C++ interval tree algorithm implementation

查看:210
本文介绍了发现C ++区间树算法实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一个高效的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编写的基于模板的区间树实现++的 https://github.com/ekg/intervaltree 。 MIT许可。享受。

I've written a template-based interval tree implementation in C++, https://github.com/ekg/intervaltree. MIT license. Enjoy.

这篇关于发现C ++区间树算法实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆