Inheritance diagram for Purple::RandomSearch:
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 |
Definition at line 27 of file RandomSearch.h.
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:
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] |
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.
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.
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:
filename,: | Filename. |
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:
filename,: | Filename. |
Definition at line 436 of file RandomSearch.cpp.
void Purple::RandomSearch::saveOptimizationHistory | ( | char * | filename | ) |
This method saves the optimization history to a data file.
filename,: | Filename. |
Definition at line 582 of file RandomSearch.cpp.
Vector<double> Purple::RandomSearch::evaluationHistory [private] |
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.