public class Profile extends Object
Rectangle
built from a set of Rectangle using a sweep-line algorithm.| Constructor and Description |
|---|
Profile(minicp.engine.constraints.Profile.Rectangle... rectangles) |
| Modifier and Type | Method and Description |
|---|---|
minicp.engine.constraints.Profile.Rectangle |
get(int i) |
int |
rectangleIndex(int t)
Retrieves the rectangle index of the profile that overlaps a given time.
|
minicp.engine.constraints.Profile.Rectangle[] |
rectangles()
Get the cumulated Profile from the rectangles passed in argument
to the constructor.
|
int |
size()
Return the number of rectangles in the profile.
|
String |
toString() |
public Profile(minicp.engine.constraints.Profile.Rectangle... rectangles)
public minicp.engine.constraints.Profile.Rectangle[] rectangles()
Rectanglepublic int rectangleIndex(int t)
t - the time at which we want to retrieve the overlapping rectangler.start <= t and r.end > tpublic int size()
public minicp.engine.constraints.Profile.Rectangle get(int i)
i - the rectangle indexrectangleIndex(int)Copyright © 2018 Laurent Michel, Pierre Schaus, Pascal Van Hentenryck. All rights reserved.