GClasses
GClasses::GParallelOptimizers Class Reference

Detailed Description

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...
 
GRelationrelation ()
 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
 
GRelationm_pRelation
 
std::vector< GTargetFunction * > m_targetFunctions
 

Constructor & Destructor Documentation

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 ( )

Member Function Documentation

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.

GRelation* 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.

Member Data Documentation

std::vector<GOptimizer*> GClasses::GParallelOptimizers::m_optimizers
protected
GRelation* GClasses::GParallelOptimizers::m_pRelation
protected
std::vector<GTargetFunction*> GClasses::GParallelOptimizers::m_targetFunctions
protected