|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.measurement.StateAwareMeasurement
public abstract class StateAwareMeasurement
This class serves as the base class for all state based measurements. If a measurement is a complex structure that needs to be computed over a period of time (iterations / function evaluations etc), then the measurement should extend this class.
The MeasurementSuite is aware of instances of this class and will correctly handle any data recording and restoring that may be required as the measurements are performed on the current algorithm.
Constructor Summary | |
---|---|
StateAwareMeasurement()
|
Method Summary | |
---|---|
MeasurementMemento |
getState()
Obtain a new externalised state from the current measurement. |
boolean |
isStateAware()
Get the state awareness of the current measurement. |
void |
setState(MeasurementMemento memento)
Set the state of the Measurement based on the provided instance. |
void |
setStateAware(boolean state)
Set the state of the measurement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sourceforge.cilib.measurement.Measurement |
---|
getClone, getDomain, getValue |
Methods inherited from interface java.io.Externalizable |
---|
readExternal, writeExternal |
Constructor Detail |
---|
public StateAwareMeasurement()
Method Detail |
---|
public void setStateAware(boolean state)
state
- The state awareness value of this measurement class.public boolean isStateAware()
public void setState(MeasurementMemento memento) throws IOException, ClassNotFoundException
Measurement
based on the provided instance.
memento
- The instance containing the externalised state.
IOException
- If an IO error occours.
ClassNotFoundException
- If a specified class cannot be found.public MeasurementMemento getState() throws IOException
IOException
- If an IO error occours.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |