Package apron
Class Texpr1VarNode
java.lang.Object
apron.Texpr1Node
apron.Texpr1VarNode
- All Implemented Interfaces:
Serializable,Cloneable
Class of variable leaves in
Texpr1Node level 1
expression trees.
A variable is represented as a Var name.
- See Also:
-
Field Summary
FieldsFields inherited from class apron.Texpr1Node
RDIR_DOWN, RDIR_NEAREST, RDIR_RND, RDIR_UP, RDIR_ZERO, RTYPE_DOUBLE, RTYPE_EXTENDED, RTYPE_INT, RTYPE_QUAD, RTYPE_REAL, RTYPE_SINGLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()Deep copy.booleanWhether x is a Texpr1 tree and structurally equal to this.protected voidUsed internally for getVars.intgetDepth()Returns the depth of the expression tree.intPrecedence of the node, used when printing.intgetSize()Returns the number of internal nodes in the tree.inthashCode()Recursive hashing.booleanWhether the variable var occurs in the tree.booleanStructural (recursive) equality.booleanWhether the expression is constant.booleanWhether the expression is linear with interval or scalar coefficients, and there is no rounding.booleanWhether the expression is a polynomial fraction, with interval or scalar coefficients, and there is no rounding.booleanWhether the expression is polynomial, with interval or scalar coefficients, and there is no rounding.booleanisScalar()Whether all coefficients are scalar (non interval).voidsetVariable(Var v) voidShallow copy.substitute(Var v, Texpr1Node t) Substitutes all occurrences of the variable var with the tree t.substitute(String v, Texpr1Node t) toString()Converts the expression tree to a String.Converts the level 1 tree to a level 0 tree in the given environment.Methods inherited from class apron.Texpr1Node
clone, fromLinexpr1, getVars, hasVar, substituteCopy, substituteCopy
-
Field Details
-
var
Variable name.
-
-
Constructor Details
-
Texpr1VarNode
Constructs a new variable leaf. -
Texpr1VarNode
-
-
Method Details
-
shallowCopy
Description copied from class:Texpr1NodeShallow copy.- Specified by:
shallowCopyin classTexpr1Node
-
deepCopy
Description copied from class:Texpr1NodeDeep copy.- Specified by:
deepCopyin classTexpr1Node
-
toTexpr0Node
Description copied from class:Texpr1NodeConverts the level 1 tree to a level 0 tree in the given environment.- Specified by:
toTexpr0Nodein classTexpr1Node
-
toString
Description copied from class:Texpr1NodeConverts the expression tree to a String.- Specified by:
toStringin classTexpr1Node
-
getVariable
-
setVariable
-
setVariable
-
getDepth
public int getDepth()Description copied from class:Texpr1NodeReturns the depth of the expression tree.- Specified by:
getDepthin classTexpr1Node
-
getSize
public int getSize()Description copied from class:Texpr1NodeReturns the number of internal nodes in the tree.- Specified by:
getSizein classTexpr1Node
-
hasVar
Description copied from class:Texpr1NodeWhether the variable var occurs in the tree.- Specified by:
hasVarin classTexpr1Node
-
fillVars
Description copied from class:Texpr1NodeUsed internally for getVars.- Specified by:
fillVarsin classTexpr1Node
-
isIntervalCst
public boolean isIntervalCst()Description copied from class:Texpr1NodeWhether the expression is constant.- Specified by:
isIntervalCstin classTexpr1Node
-
isIntervalLinear
public boolean isIntervalLinear()Description copied from class:Texpr1NodeWhether the expression is linear with interval or scalar coefficients, and there is no rounding.- Specified by:
isIntervalLinearin classTexpr1Node
-
isIntervalPolynomial
public boolean isIntervalPolynomial()Description copied from class:Texpr1NodeWhether the expression is polynomial, with interval or scalar coefficients, and there is no rounding.- Specified by:
isIntervalPolynomialin classTexpr1Node
-
isIntervalPolyfrac
public boolean isIntervalPolyfrac()Description copied from class:Texpr1NodeWhether the expression is a polynomial fraction, with interval or scalar coefficients, and there is no rounding.- Specified by:
isIntervalPolyfracin classTexpr1Node
-
isScalar
public boolean isScalar()Description copied from class:Texpr1NodeWhether all coefficients are scalar (non interval).- Specified by:
isScalarin classTexpr1Node
-
substitute
- Overrides:
substitutein classTexpr1Node
-
substitute
Description copied from class:Texpr1NodeSubstitutes all occurrences of the variable var with the tree t.this is modified in-place.
As some nodes can change their kind (a node for a variable var becomes the root of the tree t), a new root node is returned.
- Specified by:
substitutein classTexpr1Node
-
hashCode
public int hashCode()Description copied from class:Texpr1NodeRecursive hashing.- Specified by:
hashCodein classTexpr1Node
-
isEqual
Description copied from class:Texpr1NodeStructural (recursive) equality.- Specified by:
isEqualin classTexpr1Node
-
getPrecedence
public int getPrecedence()Description copied from class:Texpr1NodePrecedence of the node, used when printing.- Specified by:
getPrecedencein classTexpr1Node
-
equals
Description copied from class:Texpr1NodeWhether x is a Texpr1 tree and structurally equal to this.- Specified by:
equalsin classTexpr1Node
-