|
GClasses
|
This class simplifies simultaneously solving several optimization problems.
#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(). More... | |
| ~GParallelOptimizers () | |
| void | add (GTargetFunction *pTargetFunction, GOptimizer *pOptimizer) |
| Takes ownership of pTargetFunction and pOptimizer. More... | |
| double | iterateAll () |
| Perform one iteration on all of the optimizers. More... | |
| std::vector< GOptimizer * > & | optimizers () |
| Returns a vector of pointers to the optimizers. More... | |
| GRelation * | relation () |
| Returns the relation associated with these optimizers. More... | |
| double | searchUntil (size_t nBurnInIterations, size_t nIterations, double dImprovement) |
| Optimize until the specified conditions are met. More... | |
| std::vector< GTargetFunction * > & | targetFunctions () |
| Returns a vector of pointers to the target functions. More... | |
Protected Attributes | |
| std::vector< GOptimizer * > | m_optimizers |
| GRelation * | m_pRelation |
| std::vector< GTargetFunction * > | m_targetFunctions |
| 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.
|
inline |
Returns a vector of pointers to the optimizers.
|
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.
|
inline |
Returns a vector of pointers to the target functions.
|
protected |
|
protected |
|
protected |