public class Dimperm
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
A Dimperm object encapsulates an ap_dimperm_t
Apron object
allocated in the C heap.
Constructor and Description |
---|
Dimperm(Dimperm x)
Creates a copy of this.
|
Dimperm(int size)
Creates an identity permutation of dimensions 0 to size-1.
|
Dimperm(int[] dim)
Creates a permutation.
|
Modifier and Type | Method and Description |
---|---|
Dimperm |
clone()
Returns a copy of this.
|
Dimperm |
compose(Dimperm op)
Returns a permutation equal to this composed with op.
|
boolean |
equals(java.lang.Object x)
Whether x is a Dimperm and structurally equal to this.
|
protected void |
finalize()
Deallocates the underlying Apron object.
|
int[] |
getContents()
Returns the permutation map.
|
int |
getElem(int i)
Gets the variable index i is mapped to.
|
int |
getSize()
Returns the number of elements in this permutation.
|
Dimperm |
invert()
Returns a new permutation which is the inverse of this.
|
boolean |
isEqual(Dimperm x)
Whether x is equal to this.
|
void |
setElem(int i,
int dim)
Changes the permutation so that i maps to dim.
|
void |
setId()
Sets this to the identity permutation.
|
java.lang.String |
toString()
Returns a String representation of the permutation.
|
public Dimperm(int[] dim)
The permutation maps dimension i to dimension dim[i].
public Dimperm(int size)
public Dimperm(Dimperm x)
protected void finalize()
finalize
in class java.lang.Object
public void setId()
public void setElem(int i, int dim)
public int getElem(int i)
public int getSize()
public int[] getContents()
if x=a.getContents(), then a maps dimension i to x[i].
public Dimperm invert()
this is not modified.
public Dimperm compose(Dimperm op)
The result maps i to op[this[i]].
this and op must have the same size.
this is not changed.
public java.lang.String toString()
toString
in class java.lang.Object
public Dimperm clone()
clone
in class java.lang.Object
public boolean isEqual(Dimperm x)
public boolean equals(java.lang.Object x)
equals
in class java.lang.Object