net.sourceforge.cilib.measurement.multiple
Class CompositeMeasurement

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

public class CompositeMeasurement
extends Object
implements Measurement

Measurement to perform measurements on a set of contained Algorithm instances. This type of measurement is generally only defined for MultiPopulationBasedAlgorithm.

See Also:
Serialized Form

Constructor Summary
CompositeMeasurement()
          Create a new instance with zero measurements.
 
Method Summary
 void addMeasurement(Measurement measurement)
          Add a measurement to the composite for evaluation on the sub-algorithms.
 Measurement 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.
 Type getValue(Algorithm algorithm)
          Get the measurement values for all sub-algorithms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeMeasurement

public CompositeMeasurement()
Create a new instance with zero measurements.

Method Detail

getClone

public Measurement 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 measurement values for all sub-algorithms.

Specified by:
getValue in interface Measurement
Parameters:
algorithm - The top level algorithm
Returns:
The values of measurements applied to all contained algorithms.

addMeasurement

public void addMeasurement(Measurement measurement)
Add a measurement to the composite for evaluation on the sub-algorithms.

Parameters:
measurement - The measurement to add.


Copyright © 2009 CIRG. All Rights Reserved.