java.lang.Object
org.maxicp.cp.engine.constraints.scheduling.Profile

public class Profile extends Object
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.
  • Constructor Details

  • Method Details

    • rectangles

      public Profile.Rectangle[] 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 <= t and r.end > t
    • size

      public int size()
      Return the number of rectangles in the profile.
      Returns:
      the number of rectangles in the profile
    • get

      public Profile.Rectangle get(int i)
      Parameters:
      i - the rectangle index
      Returns:
      the rectangle of the profile at index i
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object