| Package | Description |
|---|---|
| blogspot.software_and_algorithms.stern_library.data_structure |
| Modifier and Type | Class and Description |
|---|---|
class |
DynamicIntervalTree<U extends Comparable<U>,T extends Interval<U>>
A dynamic interval tree is a balanced binary search tree which
stores intervals so that both point queries (queries that return intervals
from the set which contain a query point) and overlapping interval queries
(queries that return intervals from the set which overlap a query interval)
can be completed in time O(k*log(n)), where n is the number of intervals
stored in the tree and k is the size of the result set from the query.
|
protected static class |
DynamicIntervalTree.Node<U extends Comparable<U>,T extends Interval<U>>
A node for a dynamic interval tree is a red-black tree node
augmented to store the maximum high endpoint among intervals stored
within the subtree rooted at the node.
|
class |
StaticIntervalTree<U extends Comparable<U>,T extends Interval<U>>
A static interval tree is a balanced binary search tree which is
built to store a pre-specified set of intervals so that both point queries
(queries that return intervals from the set which contain a query point) and
overlapping interval queries (queries that return intervals from the set
which overlap a query interval) can be completed in time O(log(n)+k), where n
is the size of the pre-specified set of intervals and k is the size of the
result set from the query.
|
protected static class |
StaticIntervalTree.Node<U extends Comparable<U>,T extends Interval<U>>
A node for a static interval tree is a binary tree node
augmented with an associated point value and the ability to store
intervals.
|
| Modifier and Type | Method and Description |
|---|---|
int |
Interval.compareTo(Interval<T> o) |
boolean |
Interval.contains(Interval<T> interval)
Test whether or not this interval contains the specified interval.
|
void |
StaticIntervalTree.Node.fetchOverlappingIntervals(Collection<T> target,
Interval<U> queryInterval)
Fetch all intervals from this node which overlap the specified
interval.
|
boolean |
Interval.overlaps(Interval<T> interval)
Test whether or not this interval and the specified interval overlap.
|
Copyright © 1994–2024 Peter Murray-Rust. All rights reserved.