shark::soo::InterruptibleAlgorithmRunner< Algo, Function > Class Template Reference

Executes one trial of a single-objective optimizer for a given single-objective fitness function. More...

#include <shark/Algorithms/DirectSearch/InterruptibleAlgorithmRunner.h>

+ Collaboration diagram for shark::soo::InterruptibleAlgorithmRunner< Algo, Function >:

Classes

struct  ResultMetaData
 Metadata describing actual result data. More...
 

Public Member Functions

 InterruptibleAlgorithmRunner (boost::shared_ptr< Algo > algo=boost::shared_ptr< Algo >(new Algo), boost::shared_ptr< Function > function=boost::shared_ptr< Function >(new Function()))
 C'tor. More...
 
event_type & signalResultsAvailable ()
 Triggered when new results are available. More...
 
void run (unsigned int seed, unsigned int interval, unsigned int n, unsigned int g, unsigned int timeLimit, double fitnessLimit=1E-10, const boost::optional< boost::property_tree::ptree > &configNode=boost::optional< boost::property_tree::ptree >())
 Executes the optimizer trial for the given parameters. More...
 
 DEFINE_SIMPLE_OPTION (ReportFitnessFunctionsTag, reportFitnessFunctions)
 Reports known fitness functions. More...
 

Static Public Member Functions

static int main (int argc, char **argv)
 

Protected Member Functions

void signalTrap (SignalTrap::SignalType signal)
 Slot that is called when a signal is emitted from the signal trap. Stores the current front. More...
 

Protected Attributes

result_type m_result
 Stores the current front. More...
 
boost::shared_ptr< Algo > mep_algorithm
 Reference to the optimizer. More...
 
boost::shared_ptr< Function > mep_function
 Reference to the objective function. More...
 
std::string m_algoName
 Stores the name of the optimizer. More...
 
std::string m_functionName
 Stores the name of the objective function. More...
 
std::size_t m_seed
 Stores the initial seed of the trial. More...
 
std::size_t m_n
 Stores the dimension of the search space n. More...
 
boost::timer m_pt
 Timer instance for time-limited experiments. More...
 
double m_fitnessLimit
 Target fitness function value. More...
 
event_type m_signalResultsAvailable
 Signal for delivering results to the outside world. More...
 

Detailed Description

template<typename Algo, typename Function>
class shark::soo::InterruptibleAlgorithmRunner< Algo, Function >

Executes one trial of a single-objective optimizer for a given single-objective fitness function.

Template Parameters
AlgoModels the type of the optimizer.
FunctionModels the type of the objective function.

Definition at line 422 of file InterruptibleAlgorithmRunner.h.

Constructor & Destructor Documentation

template<typename Algo , typename Function >
shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::InterruptibleAlgorithmRunner ( boost::shared_ptr< Algo >  algo = boost::shared_ptr< Algo >( new Algo ),
boost::shared_ptr< Function >  function = boost::shared_ptr< Function >( new Function() ) 
)
inline

Member Function Documentation

template<typename Algo , typename Function >
shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::DEFINE_SIMPLE_OPTION ( ReportFitnessFunctionsTag  ,
reportFitnessFunctions   
)

Reports known fitness functions.

template<typename Algo , typename Function >
event_type& shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::signalResultsAvailable ( )
inline

Triggered when new results are available.

Definition at line 490 of file InterruptibleAlgorithmRunner.h.

References shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::m_signalResultsAvailable.

Member Data Documentation

template<typename Algo , typename Function >
std::string shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::m_algoName
protected
template<typename Algo , typename Function >
double shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::m_fitnessLimit
protected

Target fitness function value.

Definition at line 734 of file InterruptibleAlgorithmRunner.h.

template<typename Algo , typename Function >
std::string shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::m_functionName
protected
template<typename Algo , typename Function >
std::size_t shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::m_n
protected
template<typename Algo , typename Function >
boost::timer shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::m_pt
protected
template<typename Algo , typename Function >
result_type shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::m_result
protected
template<typename Algo , typename Function >
std::size_t shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::m_seed
protected
template<typename Algo , typename Function >
event_type shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::m_signalResultsAvailable
protected
template<typename Algo , typename Function >
boost::shared_ptr< Algo > shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::mep_algorithm
protected

Reference to the optimizer.

Definition at line 699 of file InterruptibleAlgorithmRunner.h.

Referenced by shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::run().

template<typename Algo , typename Function >
boost::shared_ptr< Function > shark::soo::InterruptibleAlgorithmRunner< Algo, Function >::mep_function
protected

The documentation for this class was generated from the following file: