public class Rectangle extends Object
Modifier and Type | Field and Description |
---|---|
IntVar[] |
length
It specifies the length of the rectangle in each dimension.
|
IntVar[] |
origin
It specifies the origin of the rectangle in each dimension.
|
Constructor and Description |
---|
Rectangle(IntVar[] list)
It constructs a rectangle.
|
Rectangle(IntVar[] origin,
IntVar[] length)
It constructs a rectangle.
|
Rectangle(List<? extends IntVar> list)
It constructs a rectangle.
|
Rectangle(Rectangle rect)
It constructs a rectangle.
|
Modifier and Type | Method and Description |
---|---|
boolean |
domOverlap(Rectangle r)
It returns true if this rectangle overlaps with a given rectangle.
|
static Stream<Var> |
getStream(Rectangle[] scope) |
int |
maxLevel()
It computes the maximum level of any variable constituting the rectangle.
|
boolean |
minLengthEq0()
It checks if a minimum length in any dimension of the rectangle can be equal 0.
|
boolean |
minUse(int selDimension,
org.jacop.constraints.IntRectangle u) |
boolean |
minUse(org.jacop.constraints.IntRectangle u) |
boolean |
settled()
It checks whether the rectangle is completely fixed.
|
static Rectangle[] |
toArrayOf2DRectangles(IntVar[][] rectangles) |
static Rectangle[] |
toArrayOf2DRectangles(IntVar[] origin1,
IntVar[] origin2,
IntVar[] length1,
IntVar[] length2) |
static Rectangle[] |
toArrayOf2DRectangles(List<? extends List<? extends IntVar>> rectangles) |
String |
toString() |
public final IntVar[] length
public final IntVar[] origin
public Rectangle(IntVar[] origin, IntVar[] length)
length
- the length of the rectangle in each dimension.origin
- the origin of the rectangle in each dimension.public Rectangle(IntVar[] list)
list
- it specifies for each dimension (one after the other) its origin and length.public Rectangle(List<? extends IntVar> list)
list
- it specifies for each dimension (one after the other) its origin and length.public Rectangle(Rectangle rect)
rect
- the rectangle based on which a new rectangle is created.public boolean domOverlap(Rectangle r)
r
- the rectangle for which the overlapping is being checked.public int maxLevel()
public boolean minLengthEq0()
public boolean minUse(int selDimension, org.jacop.constraints.IntRectangle u)
public boolean minUse(org.jacop.constraints.IntRectangle u)
public boolean settled()
public static Rectangle[] toArrayOf2DRectangles(List<? extends List<? extends IntVar>> rectangles)
public static Rectangle[] toArrayOf2DRectangles(IntVar[] origin1, IntVar[] origin2, IntVar[] length1, IntVar[] length2)
Copyright © 2022. All rights reserved.