|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object PERange
public class PERange
This class represents a range of PEs. This is used by allocation policies to keep track of PEs available at a particular time and the PEs allocated to Gridlets. For example, a Gridlet is using a range of PEs (0..4).
PERangeList
Constructor Summary | |
---|---|
PERange(int beginning,
int end)
Creates a new PERange object |
Method Summary | |
---|---|
PERange |
clone()
Returns a clone of this range |
int |
compareTo(PERange range)
Compares this range against another range of PEs. |
(package private) PERangeList |
difference(PERange rangeb)
Returns the list of ranges resulting from subtracting the given range from this range |
int |
getBegin()
Returns the beginning of the range |
int |
getEnd()
Returns the end of the range of PEs |
int |
getNumPE()
Returns the number of PEs in this range |
(package private) boolean |
intersect(PERange rangeb)
Checks whether this range intersects with the given range |
(package private) PERange |
intersection(PERange rangeb)
Returns the common range of this range with another |
(package private) void |
setBegin(int beginning)
Sets the beginning of the range |
(package private) void |
setEnd(int end)
Sets the end of the PE range |
String |
toString()
Creates a string representation of this class |
Methods inherited from class Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PERange(int beginning, int end)
beginning
- the start of the range of PEsend
- the end of the rangeMethod Detail |
---|
public int getBegin()
public int getEnd()
public int getNumPE()
public PERange clone()
clone
in class Object
public int compareTo(PERange range)
compareTo
in interface Comparable<PERange>
range
- the range to compare this range with
-1
if the beginning of this range is
smaller than the other range, 0
if they are
the same and 1
the beginning of this range is biggerpublic String toString()
toString
in class Object
PERange intersection(PERange rangeb)
rangeb
- the second range
PERangeList difference(PERange rangeb)
rangeb
- the range to compare this range against
boolean intersect(PERange rangeb)
rangeb
- the range to compare this range against
void setBegin(int beginning)
beginning
- the beginningvoid setEnd(int end)
end
- the end of the range
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |