java.lang.Object
org.maxicp.cp.engine.constraints.scheduling.Profile
Representation of a cumulated Profile data structure as a contiguous sequence of
Profile.Rectangle
built from a set of Profile.Rectangle using a sweep-line algorithm.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a rectangle which is part of theProfiledatastructure -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(int i) intrectangleIndex(int t) Retrieves the rectangle index of the profile that overlaps a given time.Get the cumulated Profile from the rectangles passed in argument to the constructor.intsize()Return the number of rectangles in the profile.toString()
-
Constructor Details
-
Profile
-
-
Method Details
-
rectangles
Get the cumulated Profile from the rectangles passed in argument to the constructor.- Returns:
- the cumulated profile is a contiguous sequence of
Profile.Rectangle
-
rectangleIndex
public int rectangleIndex(int t) Retrieves the rectangle index of the profile that overlaps a given time.- Parameters:
t- the time at which we want to retrieve the overlapping rectangle- Returns:
- the rectangle index r of the profile such that
r.start <= tandr.end > t
-
size
public int size()Return the number of rectangles in the profile.- Returns:
- the number of rectangles in the profile
-
get
- Parameters:
i- the rectangle index- Returns:
- the rectangle of the profile at index i
- See Also:
-
toString
-