Class Profile

All Implemented Interfaces:
Serializable, Cloneable, Iterable<ProfileItem>, Collection<ProfileItem>, List<ProfileItem>, RandomAccess, SequencedCollection<ProfileItem>
Direct Known Subclasses:
DiffnProfile

public class Profile extends ArrayList<ProfileItem>
Defines a basic data structure to keep the profile for the diffn/1 and cumulative/4 constraints. It consists of ordered pair of time points and the current value.
Version:
4.10
See Also:
  • Field Details

  • Constructor Details

    • Profile

      public Profile()
      It constructs the prophet file.
    • Profile

      public Profile(short type)
      It constructs the profile of a given type (e.g. for cumulative).
      Parameters:
      type - type of the profile (cumul=0, diffn=1)
  • Method Details

    • addToProfile

      public void addToProfile(int a, int b, int val)
      It adds given amount (val) to the profile between a and b.
      Parameters:
      a - the minimum range at which it is being added.
      b - the maximum range at which it is being added.
      val - the amount by which the profiles is updated.
    • max

      public int max()
      It returns the max height of the profile item encountered in the profile.
      Returns:
      the max height.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractCollection<ProfileItem>