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].
|
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.
|
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.
|
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.
|
long |
min()
Returns the min value of the domain.
|
Domain |
negation()
Returns {x ∈ Int64, ∃ e ∈ D, x = -e}.
|
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.Object
public 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.Object
Copyright © 2025. All rights reserved.