net.sourceforge.cilib.measurement.single
Class GenericFunctionMeasurement

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

public class GenericFunctionMeasurement
extends Object
implements Measurement

Author:
Theuns Cloete
See Also:
Serialized Form

Constructor Summary
GenericFunctionMeasurement()
          Create a new instance of GenericFunctionMeasurement.
GenericFunctionMeasurement(GenericFunctionMeasurement copy)
          Copy constructor.
 
Method Summary
 GenericFunctionMeasurement 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.
 Function getFunction()
          Get the set function.
 Type getValue(Algorithm algorithm)
          Get the value of the measurement.
 void setFunction(Function f)
          Set the function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericFunctionMeasurement

public GenericFunctionMeasurement()
Create a new instance of GenericFunctionMeasurement.


GenericFunctionMeasurement

public GenericFunctionMeasurement(GenericFunctionMeasurement copy)
Copy constructor. Create a copy of the provided instance.

Parameters:
copy - The instance to copy.
Method Detail

getClone

public GenericFunctionMeasurement 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()

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.

getFunction

public Function getFunction()
Get the set function.

Returns:
The contained function.

setFunction

public void setFunction(Function f)
Set the function.

Parameters:
f - The value to set.


Copyright © 2009 CIRG. All Rights Reserved.