Package apron

Class Dimchange

java.lang.Object
apron.Dimchange
All Implemented Interfaces:
Serializable, Cloneable

public class Dimchange extends Object implements Cloneable, Serializable
Class of dimension change specifications for level 0 objects.

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.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Dimchange(int intdim, int realdim, int[] dim)
    Creates a Dimchange.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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.
    Returns a copy of this.
    boolean
    Whether x is a Generator1 and structurally equal to this.
    protected void
    Deallocates the underlying Apron object.
    int[]
    Returns the position of the dimensions to be added or removed.
    Returns the number of integer-valued and real-valued variables to be added or removed.
    boolean
    Whether x is equal to this.
    Returns a String representation of the change of dimension.

    Methods inherited from class java.lang.Object

    getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Dimchange

      public Dimchange(int intdim, int realdim, int[] dim)
      Creates a Dimchange.

      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.

  • Method Details

    • finalize

      protected void finalize()
      Deallocates the underlying Apron object.
      Overrides:
      finalize in class Object
    • getDimension

      public Dimension getDimension()
      Returns the number of integer-valued and real-valued variables to be added or removed.
    • getContents

      public int[] getContents()
      Returns the position of the dimensions to be added or removed.
    • toString

      public String toString()
      Returns a String representation of the change of dimension.
      Overrides:
      toString in class Object
    • afterAdd

      public int afterAdd(int i)
      Indicates which dimension i is mapped to, assuming this is used to add dimensions.
    • afterRemove

      public int afterRemove(int i)
      Indicates which dimension i is mapped to, assuming this is used to remove dimensions.

      Returns -1 if the variable index would be removed.

    • addInvert

      public void addInvert()
      Inverts this.

      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.

    • clone

      public Dimchange clone()
      Returns a copy of this.
      Overrides:
      clone in class Object
    • isEqual

      public boolean isEqual(Dimchange x)
      Whether x is equal to this.
    • equals

      public boolean equals(Object x)
      Whether x is a Generator1 and structurally equal to this.
      Overrides:
      equals in class Object