Differential Evolution C++ library
de::processors< T > Class Template Reference

#include <processors.hpp>

List of all members.

Public Types

typedef boost::shared_ptr
< processors< T > > 
processors_ptr

Public Member Functions

 processors (size_t count, T of, processor_listener_ptr listener)
void push (individual_ptr ind)
void start ()
void wait ()
bool success ()
void push (population_ptr population)

Detailed Description

template<typename T>
class de::processors< T >

A collection of processors

This class starts and coordinates the various processors during an optimization session.

Takes the type of the objective function or objective function factory as argument (reference, pointer or shared_ptr)

Author:
adrian (12/1/2011)

Member Typedef Documentation

template<typename T>
typedef boost::shared_ptr< processors< T > > de::processors< T >::processors_ptr

A smart pointer to a collection of processors


Constructor & Destructor Documentation

template<typename T>
de::processors< T >::processors ( size_t  count,
of,
processor_listener_ptr  listener 
) [inline]

constructs a processors object, which in turn constructs the "count" processors, using the objective_function provided

Author:
adrian (12/4/2011)
Parameters:
countnumber of processors to create
ofobjective function or objective function factory
listenera listener passed to each created processor

Member Function Documentation

template<typename T>
void de::processors< T >::push ( individual_ptr  ind) [inline]

pushes on individual to the bottom of the processing queue

Author:
adrian (12/4/2011)
Parameters:
ind

Here is the caller graph for this function:

template<typename T>
void de::processors< T >::push ( population_ptr  population) [inline]

pushes all individuals in a population into the processing queue

Author:
adrian (12/15/2011)
Parameters:
population
template<typename T>
void de::processors< T >::start ( ) [inline]

starts all processors threads asynchronously (it will not wait for them to finish)

Author:
adrian (12/4/2011)

Here is the caller graph for this function:

template<typename T>
bool de::processors< T >::success ( ) [inline]

indicates whether all processors ended succesfully

Author:
adrian (12/4/2011)
Returns:
bool true if success, false if an error occured

Here is the caller graph for this function:

template<typename T>
void de::processors< T >::wait ( ) [inline]

waits for all processors to finish before returning

used for synchronous processing

Author:
adrian (12/4/2011)

Here is the call graph for this function:

Here is the caller graph for this function:


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