|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.controlparameter.RandomizingControlParameter
public class RandomizingControlParameter
A control parameter that is defined to return a constant multiplied with a random number.
This class defined the required functionality for the AccelerationComponent within a VelocityUpdate.
Field Summary | |
---|---|
protected ControlParameter |
controlParameter
|
protected Random |
randomiser
|
Constructor Summary | |
---|---|
RandomizingControlParameter()
Create a new RandomizingControlParameter instance. |
|
RandomizingControlParameter(RandomizingControlParameter copy)
Copy constructor. |
Method Summary | |
---|---|
RandomizingControlParameter |
getClone()
Clone the current object such that a comparison of the clone and original object will yield two separate, but duplicate objects. |
ControlParameter |
getControlParameter()
Get the currently used ControlParameterUpdateStrategy. |
double |
getParameter()
Get the value of this parameter after it has been multiplied with a uniform random number. |
double |
getParameter(double min,
double max)
Get the parameter value based on the provided min and max . |
Random |
getRandomiser()
Return the current Random. |
void |
setControlParameter(ControlParameter controlParameter)
Set the ControlParameterUpdateStrategy to be used. |
void |
setParameter(double value)
Set the value of the parameter in the underlying ControlParameterUpdateStrategy. |
void |
setRandomiser(Random randomiser)
Set the Random to be used. |
void |
updateParameter()
Update the contained ControlParameterUpdateStrategy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ControlParameter controlParameter
protected Random randomiser
Constructor Detail |
---|
public RandomizingControlParameter()
RandomizingControlParameter
instance. This object will be
instantiated by default with a contained ControlParameter
and a MersenneTwister as the random number generator.
public RandomizingControlParameter(RandomizingControlParameter copy)
copy
- The instance to copy.Method Detail |
---|
public RandomizingControlParameter getClone()
getClone
in interface ControlParameter
getClone
in interface Cloneable
Object.clone()
public Random getRandomiser()
public void setRandomiser(Random randomiser)
randomiser
- The Random to be used.public ControlParameter getControlParameter()
public void setControlParameter(ControlParameter controlParameter)
controlParameter
- The ControlParameterUpdateStrategy to be used.public double getParameter()
getParameter
in interface ControlParameter
public double getParameter(double min, double max)
min
and max
.
getParameter
in interface ControlParameter
min
- The minimum value to use in getting the parameter valuemax
- The maximum value to use in getting the parameter value
public void setParameter(double value)
setParameter
in interface ControlParameter
value
- The value to have the parameter set to,public void updateParameter()
updateParameter
in interface ControlParameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |