Package apron
Class Dimperm
java.lang.Object
apron.Dimperm
- All Implemented Interfaces:
Serializable,Cloneable
Class of dimension permutations for level 0 objects.
A Dimperm object encapsulates an ap_dimperm_t Apron object
allocated in the C heap.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a copy of this.Returns a permutation equal to this composed with op.booleanWhether x is a Dimperm and structurally equal to this.protected voidfinalize()Deallocates the underlying Apron object.int[]Returns the permutation map.intgetElem(int i) Gets the variable index i is mapped to.intgetSize()Returns the number of elements in this permutation.invert()Returns a new permutation which is the inverse of this.booleanWhether x is equal to this.voidsetElem(int i, int dim) Changes the permutation so that i maps to dim.voidsetId()Sets this to the identity permutation.toString()Returns a String representation of the permutation.
-
Constructor Details
-
Dimperm
public Dimperm(int[] dim) Creates a permutation.The permutation maps dimension i to dimension dim[i].
-
Dimperm
public Dimperm(int size) Creates an identity permutation of dimensions 0 to size-1. -
Dimperm
Creates a copy of this.
-
-
Method Details
-
finalize
protected void finalize()Deallocates the underlying Apron object. -
setId
public void setId()Sets this to the identity permutation. -
setElem
public void setElem(int i, int dim) Changes the permutation so that i maps to dim. -
getElem
public int getElem(int i) Gets the variable index i is mapped to. -
getSize
public int getSize()Returns the number of elements in this permutation. -
getContents
public int[] getContents()Returns the permutation map.if x=a.getContents(), then a maps dimension i to x[i].
-
invert
Returns a new permutation which is the inverse of this.this is not modified.
-
compose
Returns a permutation equal to this composed with op.The result maps i to op[this[i]].
this and op must have the same size.
this is not changed.
-
toString
Returns a String representation of the permutation. -
clone
Returns a copy of this. -
isEqual
Whether x is equal to this. -
equals
Whether x is a Dimperm and structurally equal to this.
-