EasyLocal++ Documentation


 
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

easylocal::Tester Class Template Reference

#include <EasyLocal.h>

Inheritance diagram for easylocal::Tester

Inheritance graph
[legend]
Collaboration diagram for easylocal::Tester:

Collaboration graph
[legend]
List of all members.

Public Methods

Protected Methods

Protected Attributes


Detailed Description

template<class Input, class Output, class State> class easylocal::Tester

A Tester collects a set of basic testers (move, state, ...) and allows to access them through sub-menus. It represent the external user interface provided by the framework.

Definition at line 1083 of file EasyLocal.h.


Constructor & Destructor Documentation

template<class Input, class Output, class State>
easylocal::Tester< Input, Output, State >::Tester<Input, Output, State> ( StateManager< Input, State > * sm,
OutputManager< Input, Output, State > * om,
Input * in = NULL )
 

Constructs a tester by providing it links to a state manager, an output manager, and an input object.

Parameters:
sm   a pointer to a compatible state manager
om   a pointer to a compatible output manager
in   a pointer to an input object

Definition at line 2376 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
easylocal::Tester<Input, Output, State>::~Tester<Input, Output, State> ( ) [inline, virtual]
 

Virtual destructor.

Definition at line 1088 of file EasyLocal.h.


Member Function Documentation

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::AddMoveTester<Input, Output, State> ( AbstractMoveTester< Input, Output, State > * p_amt )
 

Adds a move tester.

Parameters:
p_amt   a pointer to a move tester

Definition at line 2348 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::AddRunner ( Runner< Input, State > * p_ru )
 

Adds a runner to the tester.

Parameters:
p_ru   a pointer to a compatible runner

Definition at line 2514 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
int easylocal::Tester< Input, Output, State >::AddRunnerToSolver ( std::string name,
std::string type ) [virtual]
 

Attaches the runner whose name and type are passed as parameter to the solver.

Parameters:
name   the name of the runner to be attached
type   the type of the runner to be attached

Reimplemented from easylocal::AbstractTester.

Definition at line 2540 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::Check ( )
 

Checks wether the object state is consistent with all the related objects.

Definition at line 2425 of file EasyLocalTemplates.cpp.

Referenced by ExecuteDebuggingMenu().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::CleanMoveTesters ( )
 

Removes all the move tester.

Definition at line 2355 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::CleanRunners ( )
 

Removes all the runners attached to the tester.

Definition at line 2488 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::CleanSolver ( )
 

Removes all the runners attached to the solver

Definition at line 2526 of file EasyLocalTemplates.cpp.

Referenced by LoadInstance().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::ExecuteDebuggingMenu ( ) [protected]
 

Execute a choice made in the debugging menu.

Definition at line 2726 of file EasyLocalTemplates.cpp.

Referenced by ExecuteMainChoice().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::ExecuteMainChoice ( ) [protected]
 

Execute a choice made in the main menu.

Definition at line 2746 of file EasyLocalTemplates.cpp.

Referenced by RunMainMenu().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::ExecuteMovesChoice ( ) [protected]
 

Execute a choice from the move testers menu.

Definition at line 2813 of file EasyLocalTemplates.cpp.

Referenced by ExecuteMainChoice().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::ExecuteRunChoice ( ) [protected]
 

Execute a choice from the runners menu.

Definition at line 2823 of file EasyLocalTemplates.cpp.

Referenced by ExecuteMainChoice().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::LoadInstance ( std::string id ) [virtual]
 

Loads a problem instance specified by a name.

Parameters:
id   the identifier of the instance to be loaded

Reimplemented from easylocal::AbstractTester.

Definition at line 2639 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::Print ( std::ostream & os = std::cout ) const
 

Outputs the state of the tester on a given output stream.

Parameters:
os   the output stream

Definition at line 2444 of file EasyLocalTemplates.cpp.

Referenced by ExecuteDebuggingMenu().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::ProcessBatch ( std::string filename )
 

Processes a given batch file of experiments.

Parameters:
filename   the name of the batch file

Definition at line 2653 of file EasyLocalTemplates.cpp.

Referenced by ExecuteMainChoice().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::RunMainMenu ( )
 

Manages the tester main menu.

Definition at line 2671 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::SetInput ( Input * in )
 

Sets the internal input pointer to the new value passed as parameter.

Parameters:
in   the new input.

Definition at line 2401 of file EasyLocalTemplates.cpp.

Referenced by LoadInstance().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::SetMoveTester<Input, Output, State> ( AbstractMoveTester< Input, Output, State > * p_amt,
int i )
 

Sets the i-th move tester as the passed parameter.

Parameters:
p_amt   a pointer to a move tester
i   the position

Definition at line 2339 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::SetRunner ( Runner< Input, State > * p_ru,
unsigned int i )
 

Sets the i-th runner attached to the tester to the one passed as parameter.

Parameters:
p_ru   a pointer to a compatible runner
i   the position of the runner

Definition at line 2501 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::SetRunningParameters ( std::string name,
std::string type,
const ParameterBox & pb ) [virtual]
 

Sets the parameters of the runner specified by name and type.

Parameters:
name   the name of the runner
type   the type of the runner
pb   the parameterbox that contains the parameters to be passed

Reimplemented from easylocal::AbstractTester.

Definition at line 2575 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::SetSolver ( TokenRingSolver< Input, Output, State > * p_so )
 

Sets the token-ring solver associated to the tester.

Parameters:
p_so   a pointer to a compatible token-ring solver

Definition at line 2461 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::SetSolverParameters ( unsigned int rounds,
unsigned int start_runner = 0 )
 

Sets the parameters of the token-ring solver associated to the tester.

Parameters:
rounds   the maximum number of non improving rounds
start_runner   the runner used to start a round

Definition at line 2477 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::SetStateTester<Input, Output, State> ( StateTester< Input, Output, State > * p_st )
 

Sets the state tester as the passed parameter.

Parameters:
p_st   a pointer to a state tester

Definition at line 2364 of file EasyLocalTemplates.cpp.

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::ShowDebuggingMenu ( ) [protected]
 

Outputs a debugging menu.

Definition at line 2713 of file EasyLocalTemplates.cpp.

Referenced by ExecuteMainChoice().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::ShowMainMenu ( ) [protected]
 

Outputs the main menu options.

Definition at line 2696 of file EasyLocalTemplates.cpp.

Referenced by RunMainMenu().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::ShowMovesMenu ( ) [protected]
 

Outputs the menu for the move testers.

Definition at line 2783 of file EasyLocalTemplates.cpp.

Referenced by ExecuteMainChoice().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::ShowRunMenu ( ) [protected]
 

Outputs the menu for the runners.

Definition at line 2798 of file EasyLocalTemplates.cpp.

Referenced by ExecuteMainChoice().

template<class Input, class Output, class State>
void easylocal::Tester< Input, Output, State >::StartSolver ( ) [virtual]
 

Starts the solver and collects the results.

Reimplemented from easylocal::AbstractTester.

Definition at line 2592 of file EasyLocalTemplates.cpp.


Member Data Documentation

template<class Input, class Output, class State>
int easylocal::Tester<Input, Output, State>::choice [protected]
 

The option currently chosen from the menu.

Definition at line 1130 of file EasyLocal.h.

template<class Input, class Output, class State>
std::vector< AbstractMoveTester< Input, Output, State > * > easylocal::Tester<Input, Output, State>::move_testers [protected]
 

The set of attached move testers.

Definition at line 1118 of file EasyLocal.h.

template<class Input, class Output, class State>
Output easylocal::Tester<Input, Output, State>::out [protected]
 

The output object.

Definition at line 1129 of file EasyLocal.h.

template<class Input, class Output, class State>
Input * easylocal::Tester<Input, Output, State>::p_in [protected]
 

A pointer to the input object.

Definition at line 1128 of file EasyLocal.h.

template<class Input, class Output, class State>
OutputManager< Input, Output, State > * easylocal::Tester<Input, Output, State>::p_om [protected]
 

A pointer to an output producer.

Definition at line 1126 of file EasyLocal.h.

template<class Input, class Output, class State>
StateManager< Input, State > * easylocal::Tester<Input, Output, State>::p_sm [protected]
 

A pointer to a state manager.

Definition at line 1125 of file EasyLocal.h.

template<class Input, class Output, class State>
std::vector< Runner< Input, State > * > easylocal::Tester<Input, Output, State>::runners [protected]
 

The set of attached runners.

Definition at line 1119 of file EasyLocal.h.

template<class Input, class Output, class State>
TokenRingSolver< Input, Output, State > * easylocal::Tester<Input, Output, State>::solver [protected]
 

A token ring solver to be used for batch file processing.

Definition at line 1121 of file EasyLocal.h.

template<class Input, class Output, class State>
StateTester< Input, Output, State > * easylocal::Tester<Input, Output, State>::state_tester [protected]
 

A state tester.

Definition at line 1124 of file EasyLocal.h.

template<class Input, class Output, class State>
int easylocal::Tester<Input, Output, State>::sub_choice [protected]
 

The option currently chosen from the menu.

Definition at line 1130 of file EasyLocal.h.

template<class Input, class Output, class State>
State easylocal::Tester<Input, Output, State>::test_state [protected]
 

The current state managed by the tester.

Definition at line 1127 of file EasyLocal.h.


The documentation for this class was generated from the following files:
 
Go to: the Main Page of the documentation.