ShnitzelKiller / Interval-Tree

An implementation of the interval tree data structure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

This is an implementation of the interval tree data structure for fast intersection of a point with a large number of potentially overlapping intervals. The class IntervalTree acts as a multi-map with intervals as the keys, and allows the fast recovery of all key-value pairs intersecting with a query point.

For more information see https://en.wikipedia.org/wiki/Interval_tree.

Usage

See example.cpp for an example usage. To build the example, run

g++ -std=c++14 example.cpp -o example

This code requires C++14 or greater to compile.

About

An implementation of the interval tree data structure

License:MIT License


Languages

Language:C++ 100.0%