net.sourceforge.cilib.controlparameter
Class ProportionalControlParameter

java.lang.Object
  extended by net.sourceforge.cilib.controlparameter.ProportionalControlParameter
All Implemented Interfaces:
Serializable, ControlParameter, Cloneable

public class ProportionalControlParameter
extends Object
implements ControlParameter

A control parameter that is defined to return a proportional value.

See Also:
Serialized Form

Constructor Summary
ProportionalControlParameter()
          Create a new ProportionalControlParameter instance.
ProportionalControlParameter(ProportionalControlParameter copy)
           
 
Method Summary
 ProportionalControlParameter getClone()
          Clone the current object such that a comparison of the clone and original object will yield two separate, but duplicate objects.
 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.
 void setParameter(double value)
          Set the value of the represented parameter.
 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
 

Constructor Detail

ProportionalControlParameter

public ProportionalControlParameter()
Create a new ProportionalControlParameter instance. The default proportion value is defined to be 0.1 (10%).


ProportionalControlParameter

public ProportionalControlParameter(ProportionalControlParameter copy)
Method Detail

getClone

public ProportionalControlParameter getClone()
Clone the current object such that a comparison of the clone and original object will yield two separate, but duplicate objects.

Specified by:
getClone in interface ControlParameter
Specified by:
getClone in interface Cloneable
Returns:
The cloned ControlParameter
See Also:
Object.clone()

getParameter

public double getParameter()
Get the value of the represented parameter.

Specified by:
getParameter in interface ControlParameter
Returns:
The value of the represented parameter.

getParameter

public double getParameter(double min,
                           double max)
Get the parameter value based on the provided min and max.

Specified by:
getParameter in interface ControlParameter
Parameters:
min - The minimum value to use in getting the parameter value
max - The maximum value to use in getting the parameter value
Returns:
The value of the represented parameter.

setParameter

public void setParameter(double value)
Set the value of the represented parameter.

Specified by:
setParameter in interface ControlParameter
Parameters:
value - The value to be used.

updateParameter

public void updateParameter()
Update the required and needed parameters contained within this parameter.

Specified by:
updateParameter in interface ControlParameter


Copyright © 2009 CIRG. All Rights Reserved.