net.sourceforge.cilib.measurement.single
Class ConvergedDimensions

java.lang.Object
  extended by net.sourceforge.cilib.measurement.single.ConvergedDimensions
All Implemented Interfaces:
Serializable, Measurement, Cloneable

public class ConvergedDimensions
extends Object
implements Measurement

Calculates the average number of dimensions over all particles that have converged within a specified error from the specified optimum. This measurement will be useful to see if convergence in certain dimensions is too slow.

Author:
Andries Engelbrecht
See Also:
Serialized Form

Constructor Summary
ConvergedDimensions()
          Creates a new instance of ConvergedDimensions.
ConvergedDimensions(ConvergedDimensions copy)
          Copy constructor.
 
Method Summary
 ConvergedDimensions getClone()
          Create a cloned copy of the current object and return it.
 String getDomain()
          Get the domain string representing what this measurement's results will conform to.
 ControlParameter getErrorThreshold()
           
 StructuredType getTargetSolution()
           
 Type getValue(Algorithm algorithm)
          Get the value of the measurement.
 void setErrorThreshold(double error)
          Set the error threshold
 void setTargetSolution(String stringRepresentation)
          Set the target solution string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvergedDimensions

public ConvergedDimensions()
Creates a new instance of ConvergedDimensions.


ConvergedDimensions

public ConvergedDimensions(ConvergedDimensions copy)
Copy constructor. Creates a copy of the provided instance.

Parameters:
copy - The instance to copy.
Method Detail

getClone

public ConvergedDimensions 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 Measurement
Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

getErrorThreshold

public ControlParameter getErrorThreshold()
Returns:
The solution error threshold.

getTargetSolution

public StructuredType getTargetSolution()
Returns:
The target solution.

setErrorThreshold

public void setErrorThreshold(double error)
Set the error threshold

Parameters:
error -

setTargetSolution

public void setTargetSolution(String stringRepresentation)
                       throws ParseException
Set the target solution string representation

Parameters:
stringRepresentation -
Throws:
ParseException - if the provided String cannot be parsed.

getDomain

public String getDomain()
Get the domain string representing what this measurement's results will conform to.

Specified by:
getDomain in interface Measurement
Returns:
The Domain String representing the represenation of the measurement

getValue

public Type getValue(Algorithm algorithm)
Get the value of the measurement. The represenation of the measurement will be based on the domain string defined Measurement.getDomain()

Specified by:
getValue in interface Measurement
Parameters:
algorithm - The algorithm to obtain the measurement from.
Returns:
The Type representing the value of the measurement.


Copyright © 2009 CIRG. All Rights Reserved.