public class AllowedArea extends InternalConstraint
| Constructor and Description |
|---|
AllowedArea(Geost geost,
int[] origin,
int[] length)
It constructs an internal Geost constraint that restricts an object
to be within an allowed area.
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
AbsInfeasible(Geost.SweepDirection minlex)
It provides the largest or smallest point contained in the forbidden area represented by this
constraint.
|
int |
cardInfeasible()
It provides an approximation of the number of infeasible points enforced by this constraint only.
|
String |
checkInvariants()
It checks that this constraint has consistent data structures.
|
Collection<Var> |
definingVariables()
It provides a collection, possibly empty, of variables which define this constraint.
|
DBox |
isFeasible(Geost.SweepDirection min,
LexicographicalOrder order,
GeostObject o,
int currentShape,
int[] c)
It determines whether the given point is a feasible origin of object o, considering
this constraint only.
|
boolean |
isSingleUse()
In some cases, a constraint is used only once per sweep direction on a path
from root to leaf in the search tree.
|
boolean |
isStatic()
It provides information about the constraint future.
|
String |
toString() |
public AllowedArea(Geost geost, int[] origin, int[] length)
geost - the geost constraint for which the internal constraint is being created.origin - it specifies the origin of the area in which objects have to be placed.length - it specifies the length of the area in each dimension in which the objects have to be placed.public String checkInvariants()
public int cardInfeasible()
InternalConstraintcardInfeasible in class InternalConstraintpublic DBox isFeasible(Geost.SweepDirection min, LexicographicalOrder order, GeostObject o, int currentShape, int[] c)
InternalConstraintisFeasible in class InternalConstraintmin - the direction of the sweeporder - the order to be usedo - the object the constraint is applied tocurrentShape - the shape id that is currently considered for oc - the current position of the sweep.public int[] AbsInfeasible(Geost.SweepDirection minlex)
InternalConstraintAbsInfeasible in class InternalConstraintminlex - defines whether the maximal or minimal point should be returnedpublic Collection<Var> definingVariables()
InternalConstraintdefiningVariables in class InternalConstraintpublic boolean isStatic()
InternalConstraintisStatic in class InternalConstraintpublic boolean isSingleUse()
InternalConstraintisSingleUse in class InternalConstraintCopyright © 2016. All rights reserved.