|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectHelpingUtility
public class HelpingUtility
HelpingUtility class defines the methods for generating random values with
uniform distribution using Random
.
HelpingUtility class also reads the input parameters and their associated values from the input configuration file.
Conversion of the clock speed to appropriate speed by a factor is also performed in this class.
Field Summary | |
---|---|
private java.util.Vector |
allParamSet
list of input parameters |
private java.util.Random |
rand
a member of the java.Util.Random class |
Constructor Summary | |
---|---|
HelpingUtility()
Constructor method. |
Method Summary | |
---|---|
int |
getConvertedCycle(int cycle,
double factor)
Returns a converted cycle for the factor specified in the arguement. |
double |
getNextRandomNumber()
Returns a random number from 0 to 1 using Uniform Distribution. |
java.util.Vector |
getParamSet(int index)
Returns a set of input parameters for a particular network speicied by the arguement of the method. |
void |
readParameterFromFile(java.lang.String parameterFile)
Reads the input configuration file. |
void |
setRandomSeed()
Instantiates the rand variable. |
void |
setRandSeed(int seed)
Sets the seed for the randomizer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Random rand
private java.util.Vector allParamSet
Constructor Detail |
---|
public HelpingUtility()
Method Detail |
---|
public void setRandSeed(int seed)
seed
- seed valuepublic void setRandomSeed()
public double getNextRandomNumber()
public java.util.Vector getParamSet(int index)
index
- Index of the Network to be tested
public void readParameterFromFile(java.lang.String parameterFile)
A typical line of the file is of the format
ParamDTO
object.
parameterFile
- the name of the input configuration fileBufferedReader
,
StringTokenizer
public int getConvertedCycle(int cycle, double factor)
cycle
- cycle value of an entity, for example a resourcefactor
- ratio of the speed between an entity, for example a resource
and the switch
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |