Package apron
Class Linterm0
java.lang.Object
apron.Linterm0
- All Implemented Interfaces:
Serializable
,Cloneable
Class of terms in level 0 linear expressions and constraints.
A Linterm0 is a pair composed of a Coeff
coefficient
and a variable denoted by dimension (i.e., integer starting
from 0).
It represents a single term in a Linexpr0
or
Lincons0
.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a copy of this.boolean
Whether x is a Linterm0 and structurally equal to this.int
boolean
Whether x and this are structurally equal.void
void
setDimension
(int d) toString()
Returns a String representation of the linear term.Returns a String representation of the linear term.
-
Field Details
-
dim
public int dimDimension index (positive). -
coeff
Variable coefficient.
-
-
Constructor Details
-
Linterm0
Creates a new linear term.The coefficient is referenced, not copied.
-
Linterm0
Creates a copy of the linear term.The coefficient is copied.
-
-
Method Details
-
toString
Returns a String representation of the linear term.Dimension i is denoted by names[i].
-
toString
-
toString
Returns a String representation of the linear term.Dimension i is denoted as xi.
-
clone
Returns a copy of this. -
isEqual
Whether x and this are structurally equal. -
equals
Whether x is a Linterm0 and structurally equal to this. -
getDimension
public int getDimension() -
getCoefficient
-
setDimension
public void setDimension(int d) -
setCoeffcient
-