Package apron
Class Texpr0CstNode
java.lang.Object
apron.Texpr0Node
apron.Texpr0CstNode
- All Implemented Interfaces:
Serializable,Cloneable
Class of constant leaves in
Texpr0Node level 0
expression trees.
A constant value is represented by a Coeff object.
- See Also:
-
Field Summary
FieldsFields inherited from class apron.Texpr0Node
RDIR_DOWN, RDIR_NEAREST, RDIR_RND, RDIR_UP, RDIR_ZERO, RTYPE_DOUBLE, RTYPE_EXTENDED, RTYPE_INT, RTYPE_QUAD, RTYPE_REAL, RTYPE_SINGLE -
Constructor Summary
ConstructorsConstructorDescriptionCreate a zero constant node (DoubleScalar).Creates a new constant node. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds some dimensions and shifts coefficients accordingly .deepCopy()Deep copy.booleanWhether x is a Texpr0 tree and structurally equal to this.protected voidfillDims(boolean[] ar) Used internally by getDims.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.booleanhasDim(int var) Whether the dimension dim is present.inthashCode()Recursive hashing.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).intmaxDim()Maximum occurring dimension + 1.voidPermutes some dimensions in the expression.Removes some dimensions and shifts coefficients accordinglyvoidsetConstant(Coeff c) Shallow copy.substitute(int dim, Texpr0Node t) Substitutes all occurrences of the dimension dim with the expression tree t.Converts the expression tree to a String.Converts the level 0 tree to a level 1 tree in environment e.Methods inherited from class apron.Texpr0Node
addDimensionsCopy, clone, fromLinexpr0, getDims, permuteDimensionsCopy, removeDimensionsCopy, substituteCopy, suffixRDir, suffixRType, toString, toString
-
Field Details
-
cst
Constant value.
-
-
Constructor Details
-
Texpr0CstNode
Creates a new constant node.The coefficient is referenced, not copied.
-
Texpr0CstNode
public Texpr0CstNode()Create a zero constant node (DoubleScalar).
-
-
Method Details
-
shallowCopy
Description copied from class:Texpr0NodeShallow copy.- Specified by:
shallowCopyin classTexpr0Node
-
deepCopy
Description copied from class:Texpr0NodeDeep copy.- Specified by:
deepCopyin classTexpr0Node
-
toTexpr1Node
Description copied from class:Texpr0NodeConverts the level 0 tree to a level 1 tree in environment e.All dimension leaves are replaced with variable leaves.
- Specified by:
toTexpr1Nodein classTexpr0Node
-
toString
Description copied from class:Texpr0NodeConverts the expression tree to a String.Dimension i is denoted by names[i].
- Specified by:
toStringin classTexpr0Node
-
getConstant
-
setConstant
-
getDepth
public int getDepth()Description copied from class:Texpr0NodeReturns the depth of the expression tree.- Specified by:
getDepthin classTexpr0Node
-
getSize
public int getSize()Description copied from class:Texpr0NodeReturns the number of internal nodes in the tree.- Specified by:
getSizein classTexpr0Node
-
maxDim
public int maxDim()Description copied from class:Texpr0NodeMaximum occurring dimension + 1.- Specified by:
maxDimin classTexpr0Node
-
hasDim
public boolean hasDim(int var) Description copied from class:Texpr0NodeWhether the dimension dim is present.- Specified by:
hasDimin classTexpr0Node
-
fillDims
protected void fillDims(boolean[] ar) Description copied from class:Texpr0NodeUsed internally by getDims.- Specified by:
fillDimsin classTexpr0Node
-
isIntervalCst
public boolean isIntervalCst()Description copied from class:Texpr0NodeWhether the expression is constant.- Specified by:
isIntervalCstin classTexpr0Node
-
isIntervalLinear
public boolean isIntervalLinear()Description copied from class:Texpr0NodeWhether the expression is linear with interval or scalar coefficients, and there is no rounding.- Specified by:
isIntervalLinearin classTexpr0Node
-
isIntervalPolynomial
public boolean isIntervalPolynomial()Description copied from class:Texpr0NodeWhether the expression is polynomial, with interval or scalar coefficients, and there is no rounding.- Specified by:
isIntervalPolynomialin classTexpr0Node
-
isIntervalPolyfrac
public boolean isIntervalPolyfrac()Description copied from class:Texpr0NodeWhether the expression is a polynomial fraction, with interval or scalar coefficients, and there is no rounding.- Specified by:
isIntervalPolyfracin classTexpr0Node
-
isScalar
public boolean isScalar()Description copied from class:Texpr0NodeWhether all coefficients are scalar (non interval).- Specified by:
isScalarin classTexpr0Node
-
substitute
Description copied from class:Texpr0NodeSubstitutes all occurrences of the dimension dim with the expression tree t.this is modified in-place.
As some nodes can change their kind (a node for a dimension dim becomes the root of the tree t), a new root node is returned.
- Specified by:
substitutein classTexpr0Node
-
addDimensions
Description copied from class:Texpr0NodeAdds some dimensions and shifts coefficients accordingly .- Specified by:
addDimensionsin classTexpr0Node
-
removeDimensions
Description copied from class:Texpr0NodeRemoves some dimensions and shifts coefficients accordinglythis is modified in-place.
As some nodes can change their kind (removed dimensions become [-oo,+oo] constants), a new root node is returned.
- Specified by:
removeDimensionsin classTexpr0Node
-
permuteDimensions
Description copied from class:Texpr0NodePermutes some dimensions in the expression.- Specified by:
permuteDimensionsin classTexpr0Node
-
hashCode
public int hashCode()Description copied from class:Texpr0NodeRecursive hashing.- Specified by:
hashCodein classTexpr0Node
-
isEqual
Description copied from class:Texpr0NodeStructural (recursive) equality.- Specified by:
isEqualin classTexpr0Node
-
getPrecedence
public int getPrecedence()Description copied from class:Texpr0NodePrecedence of the node, used when printing.- Specified by:
getPrecedencein classTexpr0Node
-
equals
Description copied from class:Texpr0NodeWhether x is a Texpr0 tree and structurally equal to this.- Specified by:
equalsin classTexpr0Node
-