public class Domain
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
swigCMemOwn |
| Constructor and Description |
|---|
Domain()
By default, Domain will be empty.
|
Domain(long value)
Constructor for the common case of a singleton domain.
|
Domain(long cPtr,
boolean cMemoryOwn) |
Domain(long left,
long right)
Constructor for the common case of a single interval [left, right].
If left > right, this will result in the empty domain. |
| Modifier and Type | Method and Description |
|---|---|
Domain |
additionWith(Domain domain)
Returns {x ∈ Int64, ∃ a ∈ D, ∃ b ∈ domain, x = a + b}.
|
static Domain |
allValues()
Returns the full domain Int64.
|
Domain |
complement()
Returns the set Int64 ∖ D.
|
boolean |
contains(long value)
Returns true iff value is in Domain.
|
void |
delete() |
protected void |
finalize() |
long[] |
flattenedIntervals()
This method returns the flattened list of interval bounds of the domain.
Thus the domain {0, 1, 2, 5, 8, 9, 10} will return [0, 2, 5, 5, 8, 10] (as a C++ std::vector<int64_t>, as a java or C# long[], as a python list of integers). |
static Domain |
fromFlatIntervals(long[] flat_intervals)
This method is available in Python, Java and .NET.
|
static Domain |
fromIntervals(long[][] intervals)
This method is available in Python, Java and .NET.
|
static Domain |
fromValues(long[] values)
Creates a domain from the union of an unsorted list of integer values.
Input values may be repeated, with no consequence on the output |
static long |
getCPtr(Domain obj) |
Domain |
intersectionWith(Domain domain)
Returns the intersection of D and domain.
|
boolean |
isEmpty()
Returns true if this is the empty set.
|
long |
max()
Returns the max value of the domain.
The domain must not be empty. |
long |
min()
Returns the min value of the domain.
The domain must not be empty. |
Domain |
negation()
Returns {x ∈ Int64, ∃ e ∈ D, x = -e}.
Note in particular that if the negation of Int64 is not Int64 but Int64 \ {kint64min} !! |
long |
size()
Returns the number of elements in the domain.
|
static long |
swigRelease(Domain obj) |
java.lang.String |
toString()
Returns a compact string of a vector of intervals like "[1,4][6][10,20]".
|
Domain |
unionWith(Domain domain)
Returns the union of D and domain.
|
public Domain(long cPtr,
boolean cMemoryOwn)
public Domain()
public Domain(long value)
public Domain(long left,
long right)
public static long getCPtr(Domain obj)
public static long swigRelease(Domain obj)
protected void finalize()
finalize in class java.lang.Objectpublic void delete()
public static Domain allValues()
public static Domain fromValues(long[] values)
public static Domain fromIntervals(long[][] intervals)
public static Domain fromFlatIntervals(long[] flat_intervals)
public long[] flattenedIntervals()
public boolean isEmpty()
public long size()
public long min()
public long max()
public boolean contains(long value)
public Domain complement()
public Domain negation()
public Domain intersectionWith(Domain domain)
public Domain additionWith(Domain domain)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2024. All rights reserved.