|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectJaCoP.constraints.ProfileItem
public class ProfileItem
Defines a basic structure used to update profile for cumulative constraint. It consists if to time-points and a value denoting the interval [a, b) (a belongs to it nad b does not) and the value.
| Field Summary | |
|---|---|
int |
max
It specifies the ending point of the profile item. |
int |
min
It specifies the starting point of the profile item. |
int |
value
It specifies the amount by which this profile item contributes in the profile. |
| Constructor Summary | |
|---|---|
ProfileItem()
It constructs a profile item. |
|
ProfileItem(int a,
int b,
int val)
It constructs a profile item which spans over interval (a, b) with a given amount specified by val. |
|
ProfileItem(short type)
It constructs the profile item with a given type. |
|
ProfileItem(short type,
int a,
int b,
int val)
It constructs a profile item of a given type spanning across the given interval and contributing a given amount towards the profile. |
|
| Method Summary | |
|---|---|
int |
max()
It returns the ending point of the profile item. |
int |
min()
It returns the starting point of the profile item. |
void |
overlap(ProfileItem a,
ProfileItem left,
ProfileItem overlap,
ProfileItem right)
It compute the overlap with the specified profile item. |
void |
set(int a,
int b,
int val)
It sets the attributes of the profile item. |
void |
setMax(int b)
It sets the ending point of the profile item. |
void |
setMin(int a)
It sets the starting point of the profile item. |
void |
setValue(int val)
It sets the amount by which this profile item is contributing towards the profile. |
void |
subtract(ProfileItem a,
ProfileItem left,
ProfileItem right)
It computes subtraction of a given item and returns the result. |
java.lang.String |
toString()
|
int |
value()
It returns the amount which is being contributed by this profile item to the profile. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int min
public int max
public int value
| Constructor Detail |
|---|
public ProfileItem()
public ProfileItem(int a,
int b,
int val)
a - starting point of the profile item.b - ending point of the profile item.val - the contribution of the item towards the profile.public ProfileItem(short type)
type - it specifies the type of the profile item.
public ProfileItem(short type,
int a,
int b,
int val)
type - it specifies the type of the profile item.a - it specifies the starting point of the profile item.b - it specifies the ending point of the profile item.val - it specifies how much this profile item contributes in the profile.| Method Detail |
|---|
public int max()
public int min()
public void overlap(ProfileItem a,
ProfileItem left,
ProfileItem overlap,
ProfileItem right)
a - the object for which the overlap with current object is being computed.left - the left part of this profile item which is not being overlapped.overlap - the overlapped part.right - the right part of this profile item which is not being overlapped.
public void set(int a,
int b,
int val)
a - the starting point of the profile item.b - the ending point of the profile item.val - the amount contributed towards a profile by this profile item.public void setMax(int b)
b - public void setMin(int a)
a - public void setValue(int val)
val -
public void subtract(ProfileItem a,
ProfileItem left,
ProfileItem right)
a - the item being subtracted from this profile item.left - the left part remaining after subtraction.right - the right part remaining after subtraction.public java.lang.String toString()
toString in class java.lang.Objectpublic int value()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||