Class
IntervalTree
A datastructure that efficiently stores intervals.
Include Headers
seqan/misc/misc_interval_tree.h
Parameters
The value type. Default: int | |
The cargo/id type. Default: int Remarks: If the intervals are not associated with cargos/IDs, they will be numbered consecutively. |
Metafunctions
Type of additional data stored in an object. | |
Type of the items in the container or behind an iterator. |
Member Functions
Constructor |
Functions
Adds an interval to an interval tree. | |
Create an interval tree. | |
Find all intervals that contain the query point or overlap with the query interval. | |
Find all intervals that contain the query point, exclude intervals that touch the query, i.e. where the query point equals the start or end point. | |
Removes an interval from the interval tree. |
Examples
The following example creates an integer interval tree with string keys.
This tree is queried for keys of intervals that overlap the interval [550,900).
File "interval_tree_example.cpp"
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | |
28 | |
29 |
The resulting keys are:
exon2
coding2
Example Programs
SeqAn - Sequence Analysis Library - www.seqan.de