net.sourceforge.cilib.measurement.generic
Class Time

java.lang.Object
  extended by net.sourceforge.cilib.measurement.generic.Time
All Implemented Interfaces:
Serializable, AlgorithmListener, Measurement, Cloneable

public class Time
extends Object
implements Measurement, AlgorithmListener

Author:
Edwin Peer
See Also:
Serialized Form

Constructor Summary
Time()
          Create a default instance of Time.
Time(Time copy)
          Copy constructor.
 
Method Summary
 void algorithmFinished(AlgorithmEvent e)
          This event is fired when the algorithm has completed normally.
 void algorithmStarted(AlgorithmEvent e)
          This event is fired just prior to the execution of the main loop of the algorithm.
 void algorithmTerminated(AlgorithmEvent e)
          This event is fired when the algorithm is terminated abnormally.
 Time 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 value of the measurement.
 void iterationCompleted(AlgorithmEvent e)
          This event is fired after each iteration of the mail loop of the algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Time

public Time()
Create a default instance of Time.


Time

public Time(Time copy)
Copy constructor. Create a copy of the given instance.

Parameters:
copy - The instance to copy.
Method Detail

getClone

public Time 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 AlgorithmListener
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.

algorithmStarted

public void algorithmStarted(AlgorithmEvent e)
This event is fired just prior to the execution of the main loop of the algorithm.

Specified by:
algorithmStarted in interface AlgorithmListener
Parameters:
e - an event containing a reference to the source algorithm.

algorithmFinished

public void algorithmFinished(AlgorithmEvent e)
This event is fired when the algorithm has completed normally.

Specified by:
algorithmFinished in interface AlgorithmListener
Parameters:
e - an event containing a reference to the source algorithm.

algorithmTerminated

public void algorithmTerminated(AlgorithmEvent e)
This event is fired when the algorithm is terminated abnormally.

Specified by:
algorithmTerminated in interface AlgorithmListener
Parameters:
e - an event containing a reference to the source algorithm.

iterationCompleted

public void iterationCompleted(AlgorithmEvent e)
This event is fired after each iteration of the mail loop of the algorithm.

Specified by:
iterationCompleted in interface AlgorithmListener
Parameters:
e - an event containing a reference to the source algorithm.


Copyright © 2009 CIRG. All Rights Reserved.