Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/lodborg/interval-tree
/ functions
Functions
205 in github.com/lodborg/interval-tree
⨍
Functions
205
◇
Types & classes
22
↓ 237 callers
Method
contains
Determines if the current interval contains a query point. @param query The point. @return {@code true}, if the current interval contains the {@code
src/main/java/com/lodborg/intervaltree/Interval.java:264
↓ 154 callers
Method
add
Adds an interval to the tree. If the interval is empty, it is rejected and not stored in the tree. This operation may cause a rebalancing of the tree,
src/main/java/com/lodborg/intervaltree/IntervalTree.java:63
↓ 96 callers
Method
size
Returns the size of the tree. @return The amount of intervals, stored in the tree.
src/main/java/com/lodborg/intervaltree/IntervalTree.java:222
↓ 85 callers
Method
isRightOf
This method checks, if this current interval is entirely to the right of a point. More formally, the method will return {@code true}, if for every poi
src/main/java/com/lodborg/intervaltree/Interval.java:379
↓ 72 callers
Method
intersects
Checks if the current interval intersects another interval. More formally, this method returns {@code true} if there is at least one point the current
src/main/java/com/lodborg/intervaltree/Interval.java:359
↓ 71 callers
Method
isLeftOf
This method checks, if this current interval is entirely to the left of a point. More formally, the method will return {@code true}, if for every poin
src/main/java/com/lodborg/intervaltree/Interval.java:434
↓ 65 callers
Method
query
Searches for and returns all intervals stored in the tree, that contain a given query point. This operation is guaranteed to run in {@code O(logn + k)
src/main/java/com/lodborg/intervaltree/IntervalTree.java:83
↓ 32 callers
Method
getIntersection
Returns an interval, representing the intersection of two intervals. More formally, for every point {@code x} in the returned interval, {@code x} will
src/main/java/com/lodborg/intervaltree/Interval.java:285
↓ 30 callers
Method
build
Builds the new interval @return The newly created interval.
src/main/java/com/lodborg/intervaltree/Interval.java:735
↓ 30 callers
Method
isEmpty
Checks if the current interval contains no points. <p>In particular, if the end point is less than the start point, then the interval is considered t
src/main/java/com/lodborg/intervaltree/Interval.java:172
↓ 29 callers
Method
builder
()
src/main/java/com/lodborg/intervaltree/Interval.java:644
↓ 23 callers
Method
getEnd
Returns the end point of the interval.
src/main/java/com/lodborg/intervaltree/Interval.java:234
↓ 23 callers
Method
getStart
Returns the start point of the interval.
src/main/java/com/lodborg/intervaltree/Interval.java:230
↓ 17 callers
Method
getMidpoint
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:755
↓ 17 callers
Method
getRandomInRange
(int min, int max)
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:145
↓ 17 callers
Method
remove
Removes an interval from the tree, if it was stored in it. This operation may cause the {@link TreeNode#deleteNode(TreeNode) deletion of a node}, whic
src/main/java/com/lodborg/intervaltree/IntervalTree.java:142
↓ 15 callers
Method
height
Returns the height of the subtree, rooted at the current node. @return The height of the subtree, rooted ad the current node. It will be 1, if the no
src/main/java/com/lodborg/intervaltree/TreeNode.java:168
↓ 14 callers
Method
create
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:750
↓ 14 callers
Method
greaterEqual
Sets the start point of the currently building interval to the given value. The interval will be closed to the left. If this method is called more tha
src/main/java/com/lodborg/intervaltree/Interval.java:697
↓ 14 callers
Method
less
Sets the end point of the currently building interval to the given value. The interval will be open to the right. If this method is called more than o
src/main/java/com/lodborg/intervaltree/Interval.java:711
↓ 13 callers
Method
greater
Sets the start point of the currently building interval to the given value. The interval will be open to the left. If this method is called more than
src/main/java/com/lodborg/intervaltree/Interval.java:683
↓ 13 callers
Method
lessEqual
Sets the end point of the currently building interval to the given value. The interval will be closed to the right. If this method is called more than
src/main/java/com/lodborg/intervaltree/Interval.java:725
↓ 13 callers
Method
parse
(String str)
src/test/java/com/lodborg/intervaltree/DateIntervalTest.java:79
↓ 12 callers
Method
contains
Checks if a given object is stored in the tree. This method uses binary search instead of iteration over all intervals, which is why it runs in guaran
src/main/java/com/lodborg/intervaltree/IntervalTree.java:244
↓ 7 callers
Method
equals
(Object obj)
src/main/java/com/lodborg/intervaltree/Interval.java:623
↓ 7 callers
Method
hasNext
()
src/main/java/com/lodborg/intervaltree/IntervalTree.java:196
↓ 7 callers
Method
iterator
()
src/main/java/com/lodborg/intervaltree/IntervalTree.java:157
↓ 7 callers
Method
next
()
src/main/java/com/lodborg/intervaltree/IntervalTree.java:201
↓ 5 callers
Method
isStartInclusive
Returns {@code true}, if the start point is a part of the interval, or false otherwise.
src/main/java/com/lodborg/intervaltree/Interval.java:238
↓ 4 callers
Method
assimilateOverlappingIntervals
Transfers all intervals from a target node to the current node, if they intersect the middlepoint of the current node. After this operation, it is pos
src/main/java/com/lodborg/intervaltree/TreeNode.java:261
↓ 4 callers
Method
isEndInclusive
Returns {@code true}, if the end point is a part of the interval, or false otherwise.
src/main/java/com/lodborg/intervaltree/Interval.java:242
↓ 4 callers
Method
query
A helper function for the {@link IntervalTree#query(Comparable)} method. It searches recursively for all intervals stored in the subtree rooted at the
src/main/java/com/lodborg/intervaltree/TreeNode.java:300
↓ 3 callers
Method
balanceOut
Checks if the subtree rooted at the current node is balanced and balances it if necessary. @return The new root of the subtree, after the balancing o
src/main/java/com/lodborg/intervaltree/TreeNode.java:193
↓ 3 callers
Method
isPoint
Determines if the current interval is a single point. @return {@code true}, if the current interval represents a single point.
src/main/java/com/lodborg/intervaltree/Interval.java:251
↓ 3 callers
Method
leftRotate
Performs a left rotation of the current node, by promoting its right child and demoting the current node. After the left rotation, the promoted node {
src/main/java/com/lodborg/intervaltree/TreeNode.java:225
↓ 3 callers
Method
rightRotate
Performs a right rotation of the current node, by promoting its left child and demoting the current node. After the right rotation, the promoted node
src/main/java/com/lodborg/intervaltree/TreeNode.java:243
↓ 3 callers
Method
run
()
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:200
↓ 2 callers
Method
clear
Removes all intervals from the tree. This is an {@code O(1)} worst-case time operation.
src/main/java/com/lodborg/intervaltree/IntervalTree.java:230
↓ 2 callers
Method
compareEnds
A {@link Comparator} that only considers the end points of the intervals. It can not and must not be used as a standalone {@link Comparator}. It only
src/main/java/com/lodborg/intervaltree/Interval.java:501
↓ 2 callers
Method
compareSpecialization
A method that should be overwritten by subclasses of {@code Interval}, if they have properties that characterize the objects of the class and are used
src/main/java/com/lodborg/intervaltree/Interval.java:609
↓ 2 callers
Method
compareStarts
A {@link Comparator} that only considers the start points of the intervals. It can not and must not be used as a standalone {@link Comparator}. It onl
src/main/java/com/lodborg/intervaltree/Interval.java:481
↓ 2 callers
Method
create
Used to create new instances of a specific {@code Interval} subclass. <p> The {@code Interval} class aims to avoid reflexion. On several occasions, ho
src/main/java/com/lodborg/intervaltree/Interval.java:197
↓ 2 callers
Method
createRandom
()
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:52
↓ 2 callers
Method
deleteNode
Deletes a node from the tree. The caller of this method needs to check, if the node is actually empty, because this method only performs the deletion.
src/main/java/com/lodborg/intervaltree/TreeNode.java:367
↓ 2 callers
Method
performLookupList
(T query)
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:231
↓ 2 callers
Method
performLookupTree
(T query)
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:238
↓ 2 callers
Method
printResults
()
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:321
↓ 2 callers
Method
randomIntervalClosed
()
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:270
↓ 2 callers
Method
remove
()
src/main/java/com/lodborg/intervaltree/TreeNode.java:506
↓ 2 callers
Method
removeInterval
A helper function for the {@link IntervalTree#remove(Interval)} method. It searches recursively for the base node of a target interval and removes the
src/main/java/com/lodborg/intervaltree/TreeNode.java:339
↓ 1 callers
Method
addInterval
A helper function for the {@link IntervalTree#add(Interval)} method. Adds a new interval to the subtree rooted at a {@code TreeNode}. @param tree The
src/main/java/com/lodborg/intervaltree/TreeNode.java:141
↓ 1 callers
Method
check
(T query)
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:245
↓ 1 callers
Method
createRandom
()
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:196
↓ 1 callers
Method
getMidpoint
Returns the center of the current interval. If the center of the interval exists, but can't be determined, return any point inside the interval. This
src/main/java/com/lodborg/intervaltree/Interval.java:209
↓ 1 callers
Method
hasNext
()
src/main/java/com/lodborg/intervaltree/TreeNode.java:484
↓ 1 callers
Method
isEmpty
Determines if the interval is empty, meaning it contains no Integers. In particular, this method will return {@code true} for the open interval (4, 5)
src/main/java/com/lodborg/intervaltree/IntegerInterval.java:72
↓ 1 callers
Method
isEmpty
Determines if the interval is empty, meaning it contains no Doubles. Unlike the class {@link IntegerInterval}, the interval (4.0, 5.0), for example, w
src/main/java/com/lodborg/intervaltree/DoubleInterval.java:67
↓ 1 callers
Method
iterator
An iterator over all intervals stored in subtree rooted at the current node. Traversal is done via classic iterative in-order tree traversal where eac
src/main/java/com/lodborg/intervaltree/TreeNode.java:472
↓ 1 callers
Method
linearCheck
(List<Interval<Integer>> list, T query)
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:261
↓ 1 callers
Method
listCondition
(Interval<Integer> list, T query)
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:195
↓ 1 callers
Method
prepareDataStructures
()
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:205
↓ 1 callers
Method
print
(Interval<Integer> inter)
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:140
↓ 1 callers
Method
rangeQueryLeft
A helper method for the range search used in the interval intersection query in the tree. This corresponds to the left branch of the range search, onc
src/main/java/com/lodborg/intervaltree/TreeNode.java:413
↓ 1 callers
Method
rangeQueryRight
A helper method for the range search used in the interval intersection query in the tree. This corresponds to the right branch of the range search, on
src/main/java/com/lodborg/intervaltree/TreeNode.java:445
↓ 1 callers
Method
runChecks
()
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:217
↓ 1 callers
Method
treeCheck
(IntervalTree<Integer> tree, T query)
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:194
Method
Builder
{@code private} constructor, used only in the internals of the {@link Interval} class. You can create new instances of the class by using either an ex
src/main/java/com/lodborg/intervaltree/Interval.java:671
Method
Checker
(Configuration config)
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:190
Method
DateInterval
Instantiates an interval extending from positive infinity to negative infinity and thus containing all Dates.
src/main/java/com/lodborg/intervaltree/DateInterval.java:14
Method
DoubleInterval
Instantiates an interval extending from positive infinity to negative infinity and thus containing all Doubles.
src/main/java/com/lodborg/intervaltree/DoubleInterval.java:23
Method
IntMock
(int start, int end, Bounded type)
src/test/java/com/lodborg/intervaltree/IntervalTest.java:738
Method
IntegerInterval
Instantiates an interval extending from positive infinity to negative infinity and thus containing all Integers.
src/main/java/com/lodborg/intervaltree/IntegerInterval.java:12
Method
Interval
Instantiates a new interval representing all points in the domain of definition, i.e. this will instantiate the interval (-inf, +inf).
src/main/java/com/lodborg/intervaltree/Interval.java:87
Method
TimeLimitedChecker
(Configuration config, int timeLimitInSeconds)
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:154
Method
TreeNode
Instantiates a new node in an {@link IntervalTree}. @param interval The initial interval stored in the node. The middlepoint of the n
src/main/java/com/lodborg/intervaltree/TreeNode.java:119
Method
benchmark
()
src/test/java/com/lodborg/intervaltree/RandomizedTest.java:23
Method
boundedContainsGenericPoint
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:292
Method
builderWithOnlyOneMethod
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:446
Method
builderWithSameMethodTwice
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:471
Method
builderWithTwoDifferentMethodsOfSameType
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:492
Method
builderWithTwoMethods
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:455
Method
closedLeftContainsOffByOne
()
src/test/java/com/lodborg/intervaltree/IntegerIntervalTest.java:241
Method
closedLeftContainsOtherWithCommonLeftEndpoint
()
src/test/java/com/lodborg/intervaltree/IntegerIntervalTest.java:175
Method
closedRightContainsOtherWithCommonRightEndpoint
()
src/test/java/com/lodborg/intervaltree/IntegerIntervalTest.java:203
Method
compare
(Interval a, Interval b)
src/main/java/com/lodborg/intervaltree/Interval.java:536
Method
create
()
src/main/java/com/lodborg/intervaltree/DateInterval.java:43
Method
create
()
src/main/java/com/lodborg/intervaltree/IntegerInterval.java:41
Method
create
()
src/main/java/com/lodborg/intervaltree/DoubleInterval.java:52
Method
emptyContainsGenericPoint
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:354
Method
equalsOtherClasses
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:437
Method
firstTest
()
src/test/java/com/lodborg/intervaltree/IntervalTreeTest.java:714
Method
getIntersectionCommonLeft
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:228
Method
getIntersectionCommonRight
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:241
Method
getIntersectionInfinityWithPoint
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:254
Method
getIntersectionWithNull
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:263
Method
getIntersectionWithPoint
()
src/test/java/com/lodborg/intervaltree/IntervalTest.java:272
Method
getMidpoint
Determines the center of the interval. <p> Similarly to the class {@link IntegerInterval}, it assumes that unbounded intervals are bounded by
src/main/java/com/lodborg/intervaltree/DateInterval.java:58
Method
getMidpoint
Determines the center of the interval. <p> For the purposes of this method, if the interval is defined unbounded, it is assumed to be bounded by Integ
src/main/java/com/lodborg/intervaltree/IntegerInterval.java:55
Method
getMidpoint
Determines the center of the interval. <p> This is done in a best-effort basis, because in unbounded intervals the center doesn't exist. This is diffe
src/main/java/com/lodborg/intervaltree/DoubleInterval.java:98
Method
hashCode
()
src/main/java/com/lodborg/intervaltree/Interval.java:613
next →
1–100 of 205, ranked by callers