public class Dimchange
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
A Dimchange object specifies how many and which dimensions to add to or
to remove from a level 0 object (Abstract0
, etc.).
A Dimchange object encapsulates a ap_dimchange_t
Apron object
allocated in the C heap.
Constructor and Description |
---|
Dimchange(int intdim,
int realdim,
int[] dim)
Creates a Dimchange.
|
Modifier and Type | Method and Description |
---|---|
void |
addInvert()
Inverts this.
|
int |
afterAdd(int i)
Indicates which dimension i is mapped to, assuming this is used
to add dimensions.
|
int |
afterRemove(int i)
Indicates which dimension i is mapped to, assuming this is used
to remove dimensions.
|
Dimchange |
clone()
Returns a copy of this.
|
boolean |
equals(java.lang.Object x)
Whether x is a Generator1 and structurally equal to this.
|
protected void |
finalize()
Deallocates the underlying Apron object.
|
int[] |
getContents()
Returns the position of the dimensions to be added or removed.
|
Dimension |
getDimension()
Returns the number of integer-valued and real-valued
variables to be added or removed.
|
boolean |
isEqual(Dimchange x)
Whether x is equal to this.
|
java.lang.String |
toString()
Returns a String representation of the change of dimension.
|
public Dimchange(int intdim, int realdim, int[] dim)
The Dimchange object adds or removes intdim integer-valued and realdim real-valued dimensions. The array dim[], of size intdim+realdim, specifies the position of dimensions to add or remove.
When used to add dimensions, dim[i]=k indicates to add one dimension at position k and shift (increment) the dimensions greater than or equal to k.
When used to remove dimensions, dim[i]=k indicates to remove the dimension k and shift (decrement) the dimensions greater than k.
protected void finalize()
finalize
in class java.lang.Object
public Dimension getDimension()
public int[] getContents()
public java.lang.String toString()
toString
in class java.lang.Object
public int afterAdd(int i)
public int afterRemove(int i)
Returns -1 if the variable index would be removed.
public void addInvert()
Assuming that this is used to add some variables then, after inversion, it can be used to remove variables and recover the original variable set.
public Dimchange clone()
clone
in class java.lang.Object
public boolean isEqual(Dimchange x)
public boolean equals(java.lang.Object x)
equals
in class java.lang.Object