Package apron

Class Generator0

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

public class Generator0 extends Object implements Cloneable, Serializable
Class of geometrical features of level 0 linear abstract elements.

A generator is a 0- or 1-dimensional affine feature of a polyhedron: a vertex, a ray, or a line. Generator0 objects represent generators on level 0 abstract objects: variables are denoted by dimension (i.e., integer starting from 0).

A Generator0 is represented as a (sparse or dense) linear expression, i.e., a Linexpr0 expression where the constant coefficient is ignored and all coefficients are scalar.

See Also:
  • Field Details

    • coord

      public Linexpr0 coord
      Coordinates of the generator.

      All coefficients must be scalar.

      The constant coefficient is ignored.

    • kind

      public int kind
      Kind of generator: LINE, RAY, VERTEX, LINEMOD, or RAYMOD.
    • LINE

      public static final int LINE
      Line: { lambda * coord | lambda in R }.
      See Also:
    • RAY

      public static final int RAY
      Ray: { lambda * coord | lambda >= 0 in R }.
      See Also:
    • VERTEX

      public static final int VERTEX
      Vertex: { coord }.
      See Also:
    • LINEMOD

      public static final int LINEMOD
      Modular line: { lambda * coord | lambda in Z }.
      See Also:
    • RAYMOD

      public static final int RAYMOD
      Modular ray: { lambda * coord | lambda in N }.
      See Also:
  • Constructor Details

    • Generator0

      public Generator0(int k, Linexpr0 c)
      Creates a new generator of the given kind with the given coordinate.

      c is referenced, not copied.

    • Generator0

      public Generator0(Generator0 g)
      Creates a copy of g.

      The linear expression (coordinate) is copied.

  • Method Details

    • toString

      public String toString()
      Returns a string representation of the generator.

      Dimension i is denoted as xi.

      Overrides:
      toString in class Object
    • toString

      public String toString(Var[] names)
      Returns a string representation of the generator.

      Dimension i is denoted by names[i].

    • toString

      public String toString(String[] names)
    • hashCode

      public int hashCode()
      Returns a hash of the generator.
      Overrides:
      hashCode in class Object
    • addDimensions

      public void addDimensions(Dimchange c)
      Adds some dimensions and shifts coefficients accordingly .
    • permuteDimensions

      public void permuteDimensions(Dimperm p)
      Permutes some dimensions in the generator.
    • addDimensionsCopy

      public Generator0 addDimensionsCopy(Dimchange c)
      Returns a copy of the generator with some dimensions added.

      this is not changed.

    • permuteDimensionsCopy

      public Generator0 permuteDimensionsCopy(Dimperm p)
      Returns a copy of the generator with some dimensions permuted.

      this is not changed.

    • clone

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

      public boolean isEqual(Generator0 x)
      Whether this and x have identical coordinate.
    • equals

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

      public Linexpr0 getCoordinate()
    • getKind

      public int getKind()
    • setCoordinate

      public void setCoordinate(Linexpr0 c)
    • setKind

      public void setKind(int k)