|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.controlparameter.BoundedControlParameter
public abstract class BoundedControlParameter
A control parameter instance that is defined to operate within a specific range of values. The range is defined as a domain string. Any time the parameter exceeds the bounded range, it will be clamped and brought back to remain on the edges of the range specified.
Field Summary | |
---|---|
protected Real |
parameter
|
protected String |
range
|
Constructor Summary | |
---|---|
BoundedControlParameter()
Create an instance of the BoundedControlParameter . |
|
BoundedControlParameter(BoundedControlParameter copy)
Create a copy of the provided instance. |
Method Summary | |
---|---|
protected void |
clamp()
Clamp the current paramter vaue between the lower and upper bound values. |
abstract BoundedControlParameter |
getClone()
Clone the current object such that a comparison of the clone and original object will yield two separate, but duplicate objects. |
double |
getLowerBound()
Get the lower bound of the control paramter. |
double |
getParameter()
Get the value of the represented parameter. |
double |
getParameter(double min,
double max)
Get the parameter value based on the provided min and max . |
String |
getRange()
Get the range of the BoundedControlParameter. |
double |
getUpperBound()
Get the upper bound for the control parameter. |
void |
setLowerBound(double lower)
Set the value of the lower bound. |
void |
setParameter(double value)
Set the value of the represented parameter. |
void |
setRange(String range)
Set the range of the parameter. |
void |
setUpperBound(double value)
Set the value for the upper bound. |
protected abstract void |
update()
Update the paramter. |
void |
updateParameter()
Update the required and needed parameters contained within this parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Real parameter
protected String range
Constructor Detail |
---|
public BoundedControlParameter()
BoundedControlParameter
.
public BoundedControlParameter(BoundedControlParameter copy)
copy
- The instance which to copy.Method Detail |
---|
public abstract BoundedControlParameter getClone()
getClone
in interface ControlParameter
getClone
in interface Cloneable
Object.clone()
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 be used.public void updateParameter()
updateParameter
in interface ControlParameter
protected abstract void update()
protected void clamp()
public double getLowerBound()
public void setLowerBound(double lower)
lower
- The value to set.public double getUpperBound()
public void setUpperBound(double value)
value
- The value to set.public String getRange()
public void setRange(String range) throws ParseException
range
- The domain string representing the range.
ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |