public class Texpr0Intern
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
A Texpr0Intern represents an expression tree, with unary and binary
operator nodes, and Coeff
constant and variables
(represented by dimension) leaves.
A Texpr0Intern encapsulates an Apron ap_texpr0_t
object,
an opaque object that can be passed to and retreived from Apron
abstract domains.
Texpr0Intern objects can be converted from and to Texpr0Node
concrete expression trees for construction and inspection.
Constructor and Description |
---|
Texpr0Intern(Linexpr0 e)
Converts a linear expression to a comb-like expression tree.
|
Texpr0Intern(Texpr0Intern c)
Deep copy.
|
Texpr0Intern(Texpr0Node t)
Converts a Java concrete tree to an opaque Apron tree (deep copy).
|
Modifier and Type | Method and Description |
---|---|
void |
addDimensions(Dimchange c)
Adds some dimensions and shifts coefficients accordingly.
|
Texpr0Intern |
addDimensionsCopy(Dimchange c)
Returns a copy of this with some dimensions added.
|
Texpr0Intern |
clone()
Returns a deep copy of this.
|
boolean |
equals(java.lang.Object x)
Whether x is a Texpr0Intern tree and structurally equal to this.
|
protected void |
finalize()
Deallocates the underlying ap_texpr0_t Apron object.
|
int |
getDepth()
Returns the depth of the expression tree.
|
int[] |
getDims()
Returns an ordered list of all occurring dimensions.
|
int |
getSize()
Returns the number of internal nodes in the tree.
|
boolean |
hasDim(int dim)
Whether the dimension dim is present.
|
int |
hashCode()
Recursive hashing.
|
boolean |
isEqual(Texpr0Intern t)
Structural (recursive) equality.
|
boolean |
isIntervalCst()
Whether the expression is constant.
|
boolean |
isIntervalLinear()
Whether the expression is linear with interval or scalar coefficients,
and there is no rounding.
|
boolean |
isIntervalPolyfrac()
Whether the expression is a polynomial fraction, with interval or
scalar coefficients, and there is no rounding.
|
boolean |
isIntervalPolynomial()
Whether the expression is polynomial, with interval or scalar
coefficients, and there is no rounding.
|
boolean |
isScalar()
Whether all coefficients are scalar (non interval).
|
int |
maxDim()
Maximum occurring dimension + 1.
|
void |
permuteDimensions(Dimperm p)
Permutes some dimensions in the expression.
|
Texpr0Intern |
permuteDimensionsCopy(Dimperm p)
Returns a copy of this with some dimensions permuted.
|
void |
removeDimensions(Dimchange c)
Removes some dimensions and shifts coefficients accordingly.
|
Texpr0Intern |
removeDimensionsCopy(Dimchange c)
Returns a copy of this with some dimensions removed.
|
void |
substitute(int dim,
Texpr0Intern t)
Substitutes all occurrences of the dimension dim with
the expression tree t.
|
Texpr0Intern |
substituteCopy(int dim,
Texpr0Intern t)
Returns a copy of this where all occurrences of the dimension dim
are substituted with the expression tree t.
|
java.lang.String |
toString()
Converts the expression tree to a String.
|
java.lang.String |
toString(java.lang.String[] names) |
java.lang.String |
toString(Var[] names)
Converts the expression tree to a String.
|
Texpr0Node |
toTexpr0Node()
Converts an opaque Apron tree to a concrete Java tree.
|
public Texpr0Intern(Texpr0Node t)
public Texpr0Intern(Linexpr0 e)
public Texpr0Intern(Texpr0Intern c)
protected void finalize()
finalize
in class java.lang.Object
public Texpr0Node toTexpr0Node()
public int getDepth()
public int getSize()
public int maxDim()
public boolean hasDim(int dim)
public int[] getDims()
public boolean isIntervalCst()
public boolean isIntervalLinear()
public boolean isIntervalPolynomial()
public boolean isIntervalPolyfrac()
public boolean isScalar()
public void substitute(int dim, Texpr0Intern t)
public Texpr0Intern substituteCopy(int dim, Texpr0Intern t)
public void addDimensions(Dimchange c)
public Texpr0Intern addDimensionsCopy(Dimchange c)
public void removeDimensions(Dimchange c)
public Texpr0Intern removeDimensionsCopy(Dimchange c)
public void permuteDimensions(Dimperm p)
public Texpr0Intern permuteDimensionsCopy(Dimperm p)
public int hashCode()
hashCode
in class java.lang.Object
public boolean isEqual(Texpr0Intern t)
public java.lang.String toString()
Dimension i is denoted as xi.
toString
in class java.lang.Object
public java.lang.String toString(Var[] names)
Dimension i is denoted by names[i].
public java.lang.String toString(java.lang.String[] names)
public Texpr0Intern clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object x)
equals
in class java.lang.Object