Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.util.SortedDisjointIntervalList Class Reference

Public Member Functions

 SortedDisjointIntervalList (long cPtr, boolean cMemoryOwn)
 
synchronized void delete ()
 
 SortedDisjointIntervalList ()
 
 SortedDisjointIntervalList (long[] starts, long[] ends)
 
 SortedDisjointIntervalList (int[] starts, int[] ends)
 
SortedDisjointIntervalList buildComplementOnInterval (long start, long end)
 
void insertIntervals (long[] starts, long[] ends)
 
void insertIntervals (int[] starts, int[] ends)
 
int numIntervals ()
 
String toString ()
 
void insertInterval (long start, long end)
 

Static Public Member Functions

static long getCPtr (SortedDisjointIntervalList obj)
 
static long swigRelease (SortedDisjointIntervalList obj)
 

Protected Member Functions

void finalize ()
 

Protected Attributes

transient boolean swigCMemOwn
 

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.

Constructor & Destructor Documentation

◆ SortedDisjointIntervalList() [1/4]

com.google.ortools.util.SortedDisjointIntervalList.SortedDisjointIntervalList ( long cPtr,
boolean cMemoryOwn )

Definition at line 22 of file SortedDisjointIntervalList.java.

◆ SortedDisjointIntervalList() [2/4]

com.google.ortools.util.SortedDisjointIntervalList.SortedDisjointIntervalList ( )

Definition at line 58 of file SortedDisjointIntervalList.java.

◆ SortedDisjointIntervalList() [3/4]

com.google.ortools.util.SortedDisjointIntervalList.SortedDisjointIntervalList ( long[] starts,
long[] ends )

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_t and one for int.

Definition at line 67 of file SortedDisjointIntervalList.java.

◆ SortedDisjointIntervalList() [4/4]

com.google.ortools.util.SortedDisjointIntervalList.SortedDisjointIntervalList ( int[] starts,
int[] ends )

Definition at line 71 of file SortedDisjointIntervalList.java.

Member Function Documentation

◆ buildComplementOnInterval()

SortedDisjointIntervalList com.google.ortools.util.SortedDisjointIntervalList.buildComplementOnInterval ( long start,
long end )

Builds the complement of the interval list on the interval [start, end].

Definition at line 78 of file SortedDisjointIntervalList.java.

◆ delete()

synchronized void com.google.ortools.util.SortedDisjointIntervalList.delete ( )

Definition at line 48 of file SortedDisjointIntervalList.java.

◆ finalize()

void com.google.ortools.util.SortedDisjointIntervalList.finalize ( )
protected

Definition at line 44 of file SortedDisjointIntervalList.java.

◆ getCPtr()

static long com.google.ortools.util.SortedDisjointIntervalList.getCPtr ( SortedDisjointIntervalList obj)
static

Definition at line 27 of file SortedDisjointIntervalList.java.

◆ insertInterval()

void com.google.ortools.util.SortedDisjointIntervalList.insertInterval ( long start,
long end )

Definition at line 107 of file SortedDisjointIntervalList.java.

◆ insertIntervals() [1/2]

void com.google.ortools.util.SortedDisjointIntervalList.insertIntervals ( int[] starts,
int[] ends )

Definition at line 92 of file SortedDisjointIntervalList.java.

◆ insertIntervals() [2/2]

void com.google.ortools.util.SortedDisjointIntervalList.insertIntervals ( long[] starts,
long[] ends )

Adds all intervals [starts[i]..ends[i]].

Same behavior as InsertInterval() upon invalid intervals. There's a version
with int64_t and int32_t.

Definition at line 88 of file SortedDisjointIntervalList.java.

◆ numIntervals()

int com.google.ortools.util.SortedDisjointIntervalList.numIntervals ( )

Returns the number of disjoint intervals in the list.

Definition at line 99 of file SortedDisjointIntervalList.java.

◆ swigRelease()

static long com.google.ortools.util.SortedDisjointIntervalList.swigRelease ( SortedDisjointIntervalList obj)
static

Definition at line 31 of file SortedDisjointIntervalList.java.

◆ toString()

String com.google.ortools.util.SortedDisjointIntervalList.toString ( )

Definition at line 103 of file SortedDisjointIntervalList.java.

Member Data Documentation

◆ swigCMemOwn

transient boolean com.google.ortools.util.SortedDisjointIntervalList.swigCMemOwn
protected

Definition at line 20 of file SortedDisjointIntervalList.java.


The documentation for this class was generated from the following file: