GClasses
|
This class simplifies simultaneously solving several optimization problems. More...
#include <GOptimizer.h>
Public Member Functions | |
GParallelOptimizers (size_t dims) | |
If the problems all have the same number of dims, and they're all continuous, you can call relation() to get a relation for constructing the target functions. Otherwise, use dims=0 and don't call relation(). | |
~GParallelOptimizers () | |
sp_relation & | relation () |
Returns the relation associated with these optimizers. | |
void | add (GTargetFunction *pTargetFunction, GOptimizer *pOptimizer) |
Takes ownership of pTargetFunction and pOptimizer. | |
std::vector< GOptimizer * > & | optimizers () |
Returns a vector of pointers to the optimizers. | |
std::vector< GTargetFunction * > & | targetFunctions () |
Returns a vector of pointers to the target functions. | |
double | iterateAll () |
Perform one iteration on all of the optimizers. | |
double | searchUntil (size_t nBurnInIterations, size_t nIterations, double dImprovement) |
Optimize until the specified conditions are met. | |
Protected Attributes | |
sp_relation | m_pRelation |
std::vector< GTargetFunction * > | m_targetFunctions |
std::vector< GOptimizer * > | m_optimizers |
This class simplifies simultaneously solving several optimization problems.
GClasses::GParallelOptimizers::GParallelOptimizers | ( | size_t | dims | ) |
If the problems all have the same number of dims, and they're all continuous, you can call relation() to get a relation for constructing the target functions. Otherwise, use dims=0 and don't call relation().
GClasses::GParallelOptimizers::~GParallelOptimizers | ( | ) |
void GClasses::GParallelOptimizers::add | ( | GTargetFunction * | pTargetFunction, |
GOptimizer * | pOptimizer | ||
) |
Takes ownership of pTargetFunction and pOptimizer.
double GClasses::GParallelOptimizers::iterateAll | ( | ) |
Perform one iteration on all of the optimizers.
std::vector<GOptimizer*>& GClasses::GParallelOptimizers::optimizers | ( | ) | [inline] |
Returns a vector of pointers to the optimizers.
sp_relation& GClasses::GParallelOptimizers::relation | ( | ) | [inline] |
Returns the relation associated with these optimizers.
double GClasses::GParallelOptimizers::searchUntil | ( | size_t | nBurnInIterations, |
size_t | nIterations, | ||
double | dImprovement | ||
) |
Optimize until the specified conditions are met.
std::vector<GTargetFunction*>& GClasses::GParallelOptimizers::targetFunctions | ( | ) | [inline] |
Returns a vector of pointers to the target functions.
std::vector<GOptimizer*> GClasses::GParallelOptimizers::m_optimizers [protected] |
std::vector<GTargetFunction*> GClasses::GParallelOptimizers::m_targetFunctions [protected] |