MultiTrials is a class that evaluate in more than one trial. More...

Inheritance diagram for MultiTrials:

List of all members.

Public Member Functions

 MultiTrials (int steps=1, int trials=1)
 Default Constructor.
virtual ~MultiTrials ()
 Destructor.
virtual MultiTrialsclone () const =0
 Create an exact copy of MultiTrials.
virtual void configure (ConfigurationParameters &params, QString prefix)
 Configure the object using the ConfigurationParameters specified.
int currentStep () const
 return the current step
int currentTrial () const
 return the current trial
virtual void save (ConfigurationParameters &params, QString prefix)
 Save the actual status of parameters into the ConfigurationParameters object passed.
void setSteps (int s)
 set the numbers of Step to do
void setTrials (int t)
 set the numbers of Trial to do
int steps () const
 return the numbers of Step
int trials () const
 return the numbers of trials

Static Public Member Functions

static void describe (QString type)
 Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.

Protected Member Functions

virtual void mainFini ()=0
 Called at the end of all trials for finalization.
virtual void mainInit ()=0
 Called at the start of Evaluation Process.
void remainInCurrentStep (bool remain)
 Sets whether we should stop incrementing the current step counter or not.
bool remainingInCurrentStep () const
 Returns true if we are not incrementing the current step counter
See remainInCurrentStep() for more details.
void trialDone ()
 This method tell to MultiTrials that the current trial is ended.
virtual void trialFini (int trial)=0
 Called when Trial is finished.
virtual bool trialInit (int trial)=0
 Called for initialize the i-th trials.
virtual void trialStep (int step, int trial)=0
 Called at each step of the evaluation process.

Detailed Description

MultiTrials is a class that evaluate in more than one trial.

Description
MultiTrials allow an easy way to implements fitnesses calculation based on more than one trials where each of them is composed of a maximum number of steps
Warnings

Definition at line 37 of file multitrials.h.


Constructor & Destructor Documentation

MultiTrials ( int  steps = 1,
int  trials = 1 
)

Default Constructor.

Definition at line 25 of file multitrials.cpp.

References MultiTrials::steps(), and MultiTrials::trials().

~MultiTrials ( ) [virtual]

Destructor.

Definition at line 32 of file multitrials.cpp.


Member Function Documentation

virtual MultiTrials* clone ( ) const [pure virtual]

Create an exact copy of MultiTrials.

Implements Evaluation.

void configure ( ConfigurationParameters params,
QString  prefix 
) [virtual]

Configure the object using the ConfigurationParameters specified.

Parameters:
paramsthe object with configuration parameters
prefixthe group in which parameters are expected to be (this is terminated by a separator character). We expect to receive as prefix the group with evaluation parameters

Implements ParameterSettableWithConfigureFunction.

Definition at line 64 of file multitrials.cpp.

References ConfigurationParameters::getValue(), MultiTrials::setSteps(), MultiTrials::setTrials(), MultiTrials::steps(), and MultiTrials::trials().

int currentStep ( ) const

return the current step

Definition at line 56 of file multitrials.cpp.

int currentTrial ( ) const

return the current trial

Definition at line 44 of file multitrials.cpp.

void describe ( QString  type) [static]

Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.

Reimplemented from ParameterSettable.

Definition at line 81 of file multitrials.cpp.

References ParameterSettable::addTypeDescription(), ParameterSettable::Descriptor::describeInt(), ParameterSettable::IntDescriptor::help(), and ParameterSettable::IntDescriptor::limits().

virtual void mainFini ( ) [protected, pure virtual]

Called at the end of all trials for finalization.

virtual void mainInit ( ) [protected, pure virtual]

Called at the start of Evaluation Process.

void remainInCurrentStep ( bool  remain) [protected]

Sets whether we should stop incrementing the current step counter or not.


If remain is true, the current step counter stops incrementing. This means that the trialStep function will be called at each step with the same step and trial parameters. Call with remain set to false to resume the current step counter increment at each step.

Parameters:
remainif true stops incrementing the current step counter

Definition at line 87 of file multitrials.cpp.

bool remainingInCurrentStep ( ) const [protected]

Returns true if we are not incrementing the current step counter
See remainInCurrentStep() for more details.

Returns:
true if we are not incrementing the current step counter

Definition at line 92 of file multitrials.cpp.

void save ( ConfigurationParameters params,
QString  prefix 
) [virtual]

Save the actual status of parameters into the ConfigurationParameters object passed.

Parameters:
paramsthe configuration parameters object on which save actual parameters
prefixthe prefix to use to access the object configuration parameters.

Implements ParameterSettable.

Definition at line 75 of file multitrials.cpp.

References ConfigurationParameters::createParameter(), MultiTrials::steps(), and MultiTrials::trials().

Referenced by LaralGA::save().

void setSteps ( int  s)

set the numbers of Step to do

Definition at line 48 of file multitrials.cpp.

Referenced by MultiTrials::configure().

void setTrials ( int  t)

set the numbers of Trial to do

Definition at line 36 of file multitrials.cpp.

Referenced by MultiTrials::configure().

int steps ( ) const

return the numbers of Step

Definition at line 52 of file multitrials.cpp.

Referenced by MultiTrials::configure(), MultiTrials::MultiTrials(), and MultiTrials::save().

void trialDone ( ) [protected]

This method tell to MultiTrials that the current trial is ended.


Called before reaching of the maximum steps allowed (setSteps) means a premature interruption of Trial for some reasons (task achieved, penalty, etc)

Definition at line 60 of file multitrials.cpp.

virtual void trialFini ( int  trial) [protected, pure virtual]

Called when Trial is finished.

virtual bool trialInit ( int  trial) [protected, pure virtual]

Called for initialize the i-th trials.

Parameters:
trialis the counter of trial to initialize (it starts from zero)
Returns:
the implementation should return true when initialisation has been done, otherwise the method will be called until it returns false; this is helpful for initialisation that need more that one step to be done
int trials ( ) const

return the numbers of trials

Definition at line 40 of file multitrials.cpp.

Referenced by MultiTrials::configure(), MultiTrials::MultiTrials(), and MultiTrials::save().

virtual void trialStep ( int  step,
int  trial 
) [protected, pure virtual]

Called at each step of the evaluation process.

Parameters:
stepis the counter of step done (it starts from zero)
trialis the counter of trial to initialize (it starts from zero)

The documentation for this class was generated from the following files: