Beruflich Dokumente
Kultur Dokumente
8 11
Source address
1,2 2,4 4,5 5,7 7,8 8,10 10,11 11,13 1,2 2,4 4,5 5,7 7,8 8,10 10,11 11,13
2,3 3,4 5,6 6,7 8,9 9,10 11,12 12,13 2,3 3,4 5,6 6,7 8,9 9,10 11,12 12,13
[3,11] is stored in node p iff all leaves in the subtree rooted Each node of a segment tree contains 0 or more intervals.
at p are highlighted and no ancestor of p satisfies this
property.
1,2 2,4 4,5 5,7 7,8 8,10 10,11 11,13 1,2 2,4 4,5 5,7 7,8 8,10 10,11 11,13
2,3 3,4 5,6 6,7 8,9 9,10 11,12 12,13 2,3 3,4 5,6 6,7 8,9 9,10 11,12 12,13
Need to store only those nodes that contain intervals plus the
ancestors of these nodes. Range = [1,n] => Height <= ceil(log2 (n-1)) + 1.
Properties Properties
1,13 1,13
1,7 7,13 1,7 7,13
1,2 2,4 4,5 5,7 7,8 8,10 10,11 11,13 1,2 2,4 4,5 5,7 7,8 8,10 10,11 11,13
2,3 3,4 5,6 6,7 8,9 9,10 11,12 12,13 2,3 3,4 5,6 6,7 8,9 9,10 11,12 12,13
[i,j] in node v => [i,j] not in any ancestor of v . [i,j] in node v => [i,j] not in sibling of v .
Search – [5,6]
1,13
1,7 7,13
1,4
4,7 7,10 10,13
1,2 2,4 4,5 5,7 7,8 8,10 10,11 11,13
2,3 6,7
3,4 5,6 8,9 9,10 11,12 12,13