|
Differential Evolution C++ library
|
#include <processors.hpp>
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) |
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)
| typedef boost::shared_ptr< processors< T > > de::processors< T >::processors_ptr |
A smart pointer to a collection of processors
| de::processors< T >::processors | ( | size_t | count, |
| T | of, | ||
| processor_listener_ptr | listener | ||
| ) | [inline] |
constructs a processors object, which in turn constructs the "count" processors, using the objective_function provided
| count | number of processors to create |
| of | objective function or objective function factory |
| listener | a listener passed to each created processor |
| void de::processors< T >::push | ( | individual_ptr | ind | ) | [inline] |
pushes on individual to the bottom of the processing queue
| ind |

| void de::processors< T >::push | ( | population_ptr | population | ) | [inline] |
pushes all individuals in a population into the processing queue
| population |
| void de::processors< T >::start | ( | ) | [inline] |
starts all processors threads asynchronously (it will not wait for them to finish)

| bool de::processors< T >::success | ( | ) | [inline] |
indicates whether all processors ended succesfully

| void de::processors< T >::wait | ( | ) | [inline] |
waits for all processors to finish before returning
used for synchronous processing

