Purple::RandomSearch Class Reference

Inheritance diagram for Purple::RandomSearch:

Purple::OptimizationAlgorithm List of all members.

Public Member Functions

 RandomSearch (ObjectiveFunction *)
 RandomSearch (void)
virtual ~RandomSearch (void)
int getMaximumNumberOfIterations (void)
int getShowPeriod (void)
void setMaximumNumberOfIterations (int)
void setShowPeriod (int)
Vector< double > getMinimalArgument (void)
void print (void)
void load (char *)
void save (char *)
void saveOptimizationHistory (char *)

Private Attributes

Vector< double > evaluationHistory
int maximumNumberOfIterations
int showPeriod

Detailed Description

This concrete class represents the random search optimization algorithm.

See also:
ObjectiveFunction.

OptimizationAlgorithm.

Definition at line 27 of file RandomSearch.h.


Constructor & Destructor Documentation

Purple::RandomSearch::RandomSearch ( ObjectiveFunction newObjectiveFunction  ) 

General constructor. It creates a random search optimization algorithm object associated to an objective function object. It also initializes the class members to their default values:

Stopping criteria:

User stuff:

Parameters:
newObjectiveFunction,: Pointer to an objective function object.

Definition at line 46 of file RandomSearch.cpp.

Purple::RandomSearch::RandomSearch ( void   ) 

Default constructor. It creates a random search optimization algorithm object not associated to any objective function object. It also initializes the class members to their default values:

Stopping criteria:

User stuff:

Definition at line 79 of file RandomSearch.cpp.

Purple::RandomSearch::~RandomSearch ( void   )  [virtual]

Destructor.

Definition at line 97 of file RandomSearch.cpp.


Member Function Documentation

int Purple::RandomSearch::getMaximumNumberOfIterations ( void   ) 

This method returns the maximum number of iterations in the optimization process.

Definition at line 109 of file RandomSearch.cpp.

int Purple::RandomSearch::getShowPeriod ( void   ) 

This method returns the number of iterations between the optimization showing progress.

Definition at line 120 of file RandomSearch.cpp.

void Purple::RandomSearch::setMaximumNumberOfIterations ( int  newMaximumNumberOfIterations  ) 

This method sets a maximum number of iterations for optimization. Each iteration with the random search optimization algorithms costs one objective function evaluation.

Parameters:
newMaximumNumberOfIterations,: Maximum number of iterations for optimization.

Definition at line 136 of file RandomSearch.cpp.

void Purple::RandomSearch::setShowPeriod ( int  newShowPeriod  ) 

This method sets a new number of iterations between the optimization showing progress.

Parameters:
newShowPeriod,: Show period.

Definition at line 164 of file RandomSearch.cpp.

Vector< double > Purple::RandomSearch::getMinimalArgument ( void   )  [virtual]

This method returns the miminal argument of the associated objective function according to the random search optimization algorithm. Optimization occurs according to the optimization parameters.

Implements Purple::OptimizationAlgorithm.

Definition at line 190 of file RandomSearch.cpp.

void Purple::RandomSearch::print ( void   ) 

This method prints to the screen the optimization parameters concerning the random search object:

Stopping criteria:

User stuff:

Definition at line 389 of file RandomSearch.cpp.

void Purple::RandomSearch::load ( char *  filename  ) 

This method loads a random search object from a data file. Please mind about the file format, wich is specified in the User's Guide.

Stopping criteria:

User stuff:

Parameters:
filename,: Filename.
See also:
save(char*).

Definition at line 508 of file RandomSearch.cpp.

void Purple::RandomSearch::save ( char *  filename  ) 

This method saves the random search object to a data file.

Stopping criteria:

User stuff:

Parameters:
filename,: Filename.
See also:
load(char*).

Definition at line 436 of file RandomSearch.cpp.

void Purple::RandomSearch::saveOptimizationHistory ( char *  filename  ) 

This method saves the optimization history to a data file.

  1. Iteration.
  2. Objective function evaluation.

Parameters:
filename,: Filename.

Definition at line 582 of file RandomSearch.cpp.


Member Data Documentation

Vector<double> Purple::RandomSearch::evaluationHistory [private]

Objective function evaluation history.

Definition at line 36 of file RandomSearch.h.

int Purple::RandomSearch::maximumNumberOfIterations [private]

Maximum number of iterations. It is used as a train stopping criterion.

Definition at line 41 of file RandomSearch.h.

int Purple::RandomSearch::showPeriod [private]

Number of iterations between the training showing progress.

Definition at line 45 of file RandomSearch.h.


Generated on Wed Jun 21 13:10:38 2006 for Purple by  doxygen 1.4.7