Java Reference
Java Reference
Detailed Description
This class represents a sorted list of disjoint, closed intervals.
When an
interval is inserted, all intervals that overlap it or are adjacent to it are
merged into one. I.e. [0,14] and [15,30] will be merged to [0,30].
Iterators returned by this class are invalidated by non-const operations.
Definition at line 18 of file SortedDisjointIntervalList.java.
Public Member Functions | |
| SortedDisjointIntervalList (long cPtr, boolean cMemoryOwn) | |
| synchronized void | delete () |
| SortedDisjointIntervalList () | |
| SortedDisjointIntervalList (long[] starts, long[] ends) | |
| Creates a SortedDisjointIntervalList and fills it with intervals [starts[i]..ends[i]]. More... | |
| SortedDisjointIntervalList (int[] starts, int[] ends) | |
| SortedDisjointIntervalList | buildComplementOnInterval (long start, long end) |
| Builds the complement of the interval list on the interval [start, end]. More... | |
| SWIGTYPE_p_std__setT_operations_research__ClosedInterval_operations_research__SortedDisjointIntervalList__IntervalComparator_t__iterator | insertInterval (long start, long end) |
| Adds the interval [start..end] to the list, and merges overlapping or immediately adjacent intervals ([2, 5] and [6, 7] are adjacent, but [2, 5] and [7, 8] are not). More... | |
| void | insertIntervals (long[] starts, long[] ends) |
| Adds all intervals [starts[i]..ends[i]]. More... | |
| void | insertIntervals (int[] starts, int[] ends) |
| int | numIntervals () |
| Returns the number of disjoint intervals in the list. More... | |
| String | toString () |
Constructor & Destructor Documentation
◆ SortedDisjointIntervalList() [1/4]
|
inline |
Definition at line 22 of file SortedDisjointIntervalList.java.
◆ SortedDisjointIntervalList() [2/4]
|
inline |
Definition at line 46 of file SortedDisjointIntervalList.java.
◆ SortedDisjointIntervalList() [3/4]
|
inline |
Creates a SortedDisjointIntervalList and fills it with intervals
[starts[i]..ends[i]].
All intervals must be consistent (starts[i] <=
ends[i]). There are two version, one for int64 and one for int.
Definition at line 55 of file SortedDisjointIntervalList.java.
◆ SortedDisjointIntervalList() [4/4]
|
inline |
Definition at line 59 of file SortedDisjointIntervalList.java.
Member Function Documentation
◆ buildComplementOnInterval()
|
inline |
Builds the complement of the interval list on the interval [start, end].
Definition at line 66 of file SortedDisjointIntervalList.java.
◆ delete()
|
inline |
Definition at line 36 of file SortedDisjointIntervalList.java.
◆ insertInterval()
|
inline |
Adds the interval [start..end] to the list, and merges overlapping or
immediately adjacent intervals ([2, 5] and [6, 7] are adjacent, but
[2, 5] and [7, 8] are not).
Returns an iterator to the inserted interval (possibly merged with others).
If start > end, it does LOG(DFATAL) and returns end() (no interval added).
Definition at line 79 of file SortedDisjointIntervalList.java.
◆ insertIntervals() [1/2]
|
inline |
Definition at line 93 of file SortedDisjointIntervalList.java.
◆ insertIntervals() [2/2]
|
inline |
Adds all intervals [starts[i]..ends[i]].
Same behavior as InsertInterval() upon invalid intervals. There's a version
with int64 and int32.
Definition at line 89 of file SortedDisjointIntervalList.java.
◆ numIntervals()
|
inline |
Returns the number of disjoint intervals in the list.
Definition at line 100 of file SortedDisjointIntervalList.java.
◆ toString()
|
inline |
Definition at line 104 of file SortedDisjointIntervalList.java.
The documentation for this class was generated from the following file: