Class Generator1
- All Implemented Interfaces:
Serializable
,Cloneable
A Generator1 represents a 0- or 1-dimensional affine feature of a polyhedron (vertex, ray, or line) over variables denoted by names in an environment.
A Generator1 is implemented as a pair containing a (sparse or dense)
Generator0
and an Environment
,
manipulated in conjunction.
Direct access to the fields is prohibited, to avoid desynchronizing them.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Environment
Environment.protected Generator0
Level 0 generator.static final int
Line: { lambda * coord | lambda in R }.static final int
Modular line: { lambda * coord | lambda in Z }.static final int
Ray: { lambda * coord | lambda >= 0 in R }.static final int
Modular ray: { lambda * coord | lambda in N }.static final int
Vertex: { coord }. -
Constructor Summary
ConstructorsConstructorDescriptionGenerator1
(int k, Linexpr1 c) Creates a new generator of the given kind.Generator1
(Environment e, Generator0 x) Creates a new Generator1 from a Generator0.Creates a copy of g. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a copy of this.boolean
Whether x is a Generator1 and structurally equal to this.void
Expands the generator to fit the given environment.Returns a generator expanded to fit the given environment.Returns the environment of the generator.Returns a copy of the Generator0 underlying this generator.Returns a (read-only) reference to the Generator0 underlying this generator.int
hashCode()
Returns a hash of the generator.boolean
Whether this and x have identical coordinate and environment.static Generator1
make
(Environment v, Generator0 x) This function is used internally to construct a new level 1 generator by referencing a level 0 generator.toString()
Returns a String representation of the generator.
-
Field Details
-
gen
Level 0 generator. -
env
Environment. -
LINE
public static final int LINELine: { lambda * coord | lambda in R }.- See Also:
-
RAY
public static final int RAYRay: { lambda * coord | lambda >= 0 in R }.- See Also:
-
VERTEX
public static final int VERTEXVertex: { coord }.- See Also:
-
LINEMOD
public static final int LINEMODModular line: { lambda * coord | lambda in Z }.- See Also:
-
RAYMOD
public static final int RAYMODModular ray: { lambda * coord | lambda in N }.- See Also:
-
-
Constructor Details
-
Generator1
Creates a new generator of the given kind.c is copied.
-
Generator1
Creates a copy of g.The linear expression (coordinate) is copied.
-
Generator1
Creates a new Generator1 from a Generator0.All coefficients are copied.
The environment must be large enough for all variables in x.
-
-
Method Details
-
make
This function is used internally to construct a new level 1 generator by referencing a level 0 generator.The level 0 generator should no longer be used afterwards.
-
getEnvironment
Returns the environment of the generator. -
getGenerator0
Returns a copy of the Generator0 underlying this generator. -
getGenerator0Ref
Returns a (read-only) reference to the Generator0 underlying this generator.Warning: it is dangerous to add coefficients, resize the generator, add, remove, or permute dimensions as it may desynchrnonize the Generator0 dimensions form the environment.
-
toString
Returns a String representation of the generator. -
hashCode
public int hashCode()Returns a hash of the generator. -
extendEnvironment
Expands the generator to fit the given environment.e must be a super-environment of that of this.
-
extendEnvironmentCopy
Returns a generator expanded to fit the given environment.e must be a super-environment of that of this.
this is not modified.
-
clone
Returns a copy of this. -
isEqual
Whether this and x have identical coordinate and environment. -
equals
Whether x is a Generator1 and structurally equal to this.
-