public class Generator0
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
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.
Modifier and Type | Field and Description |
---|---|
Linexpr0 |
coord
Coordinates of the generator.
|
int |
kind
|
static int |
LINE
Line: { lambda * coord | lambda in R }.
|
static int |
LINEMOD
Modular line: { lambda * coord | lambda in Z }.
|
static int |
RAY
Ray: { lambda * coord | lambda >= 0 in R }.
|
static int |
RAYMOD
Modular ray: { lambda * coord | lambda in N }.
|
static int |
VERTEX
Vertex: { coord }.
|
Constructor and Description |
---|
Generator0(Generator0 g)
Creates a copy of g.
|
Generator0(int k,
Linexpr0 c)
Creates a new generator of the given kind with the given coordinate.
|
Modifier and Type | Method and Description |
---|---|
void |
addDimensions(Dimchange c)
Adds some dimensions and shifts coefficients accordingly .
|
Generator0 |
addDimensionsCopy(Dimchange c)
Returns a copy of the generator with some dimensions added.
|
Generator0 |
clone()
Returns a copy of this.
|
boolean |
equals(java.lang.Object x)
Whether x is a Generator0 and structurally equal to this.
|
Linexpr0 |
getCoordinate() |
int |
getKind() |
int |
hashCode()
Returns a hash of the generator.
|
boolean |
isEqual(Generator0 x)
Whether this and x have identical coordinate.
|
void |
permuteDimensions(Dimperm p)
Permutes some dimensions in the generator.
|
Generator0 |
permuteDimensionsCopy(Dimperm p)
Returns a copy of the generator with some dimensions permuted.
|
void |
setCoordinate(Linexpr0 c) |
void |
setKind(int k) |
java.lang.String |
toString()
Returns a string representation of the generator.
|
java.lang.String |
toString(java.lang.String[] names) |
java.lang.String |
toString(Var[] names)
Returns a string representation of the generator.
|
public Linexpr0 coord
All coefficients must be scalar.
The constant coefficient is ignored.
public int kind
public static final int LINE
public static final int RAY
public static final int VERTEX
public static final int LINEMOD
public static final int RAYMOD
public Generator0(int k, Linexpr0 c)
c is referenced, not copied.
public Generator0(Generator0 g)
The linear expression (coordinate) is copied.
public java.lang.String toString()
Dimension i is denoted as xi.
toString
in class java.lang.Object
public java.lang.String toString(Var[] names)
Dimension i is denoted by names[i].
public java.lang.String toString(java.lang.String[] names)
public int hashCode()
hashCode
in class java.lang.Object
public void addDimensions(Dimchange c)
public void permuteDimensions(Dimperm p)
public Generator0 addDimensionsCopy(Dimchange c)
this is not changed.
public Generator0 permuteDimensionsCopy(Dimperm p)
this is not changed.
public Generator0 clone()
clone
in class java.lang.Object
public boolean isEqual(Generator0 x)
public boolean equals(java.lang.Object x)
equals
in class java.lang.Object
public Linexpr0 getCoordinate()
public int getKind()
public void setCoordinate(Linexpr0 c)
public void setKind(int k)