net.sourceforge.cilib.functions.continuous.decorators
Class AngleModulation

java.lang.Object
  extended by net.sourceforge.cilib.functions.Function
      extended by net.sourceforge.cilib.functions.ContinuousFunction
          extended by net.sourceforge.cilib.functions.continuous.decorators.AngleModulation
All Implemented Interfaces:
Serializable, Cloneable

public class AngleModulation
extends ContinuousFunction

A Decorator pattern class to wrap a normal function to perform Angle Modulation. The deault values for angle modulation are:

Author:
Gary Pampara
See Also:
Serialized Form

Constructor Summary
AngleModulation()
           
AngleModulation(AngleModulation copy)
           
 
Method Summary
 double evaluate(Vector x)
          Evaluate the function with the given Vector as input.
 String generateBitString(Vector x)
           
 AngleModulation getClone()
          Create a cloned copy of the current object and return it.
 Function getFunction()
           
 Object getMaximum()
          Accessor for the function maximum.
 Object getMinimum()
          Accessor for the function minimum.
 int getPrecision()
           
 int getRequiredNumberOfBits(DomainRegistry domain)
           
 void setFunction(Function decoratedFunciton)
           
 void setPrecision(int precision)
           
 double valueOf(String bitString)
           
 double valueOf(String bitString, int index)
           
 double valueOf(String bitString, int startIndex, int endIndex)
          Determine the numeric value of the given bitstring.
 
Methods inherited from class net.sourceforge.cilib.functions.ContinuousFunction
evaluate
 
Methods inherited from class net.sourceforge.cilib.functions.Function
getBehavioralDomainRegistry, getDimension, getDomain, getDomainRegistry, setBehavioralDomain, setBehaviouralDomainRegistry, setDomain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AngleModulation

public AngleModulation()

AngleModulation

public AngleModulation(AngleModulation copy)
Method Detail

getClone

public AngleModulation getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Specified by:
getClone in class ContinuousFunction
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

getMinimum

public Object getMinimum()
Accessor for the function minimum. This is the minimum value of the function in the given domain.

Overrides:
getMinimum in class ContinuousFunction
Returns:
The minimum function value.

getMaximum

public Object getMaximum()
Accessor for the function maximum. This is the maximum value of the function in the given domain.

Overrides:
getMaximum in class ContinuousFunction
Returns:
The maximum of the function.

evaluate

public double evaluate(Vector x)
Evaluate the function with the given Vector as input.

Specified by:
evaluate in class ContinuousFunction
Parameters:
x - The input Vector.
Returns:
The value of the evaluation.

getPrecision

public int getPrecision()
Returns:

setPrecision

public void setPrecision(int precision)
Parameters:
precision -

getFunction

public Function getFunction()
Returns:

setFunction

public void setFunction(Function decoratedFunciton)
Parameters:
decoratedFunciton -

getRequiredNumberOfBits

public int getRequiredNumberOfBits(DomainRegistry domain)
Parameters:
domain -
Returns:

generateBitString

public String generateBitString(Vector x)
Parameters:
x -
Returns:

valueOf

public double valueOf(String bitString,
                      int startIndex,
                      int endIndex)
Determine the numeric value of the given bitstring. TODO: Move this into a class that will make sense.

Parameters:
bitString - The bitsting as a string
startIndex - The starting index
endIndex - The ending index
Returns:
The value of the bitstring

valueOf

public double valueOf(String bitString,
                      int index)

valueOf

public double valueOf(String bitString)


Copyright © 2009 CIRG. All Rights Reserved.