|
GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
|
Interface for a thread-safe buffer that stores incoming migrants. More...
#include <MigrationBuffer.h>
Public Member Functions | |
| virtual | ~MigrationBuffer ()=default |
| virtual void | push (std::vector< Individual< GeneType > > &&incoming_deme_batch)=0 |
| Adds a batch of individuals to the buffer. | |
| virtual void | popAll (std::vector< Individual< GeneType > > &target)=0 |
| Retrieves and removes all currently stored migrants. | |
| virtual bool | hasMigrants () const =0 |
| Checks if there are any migrants waiting in the buffer. | |
Interface for a thread-safe buffer that stores incoming migrants.
Implementations must handle asynchronous arrivals from the network and allow the GA loop to retrieve them in batches.
| GeneType | The gene type of the individuals. |
Definition at line 19 of file MigrationBuffer.h.
|
virtualdefault |
|
pure virtual |
Checks if there are any migrants waiting in the buffer.
Implemented in galib::internal::CircularBuffer< GeneType >.
|
pure virtual |
Retrieves and removes all currently stored migrants.
| target | Vector where the migrants will be moved to. |
Implemented in galib::internal::CircularBuffer< GeneType >.
|
pure virtual |
Adds a batch of individuals to the buffer.
| incoming_deme_batch | The individuals that arrived from another island. |
Implemented in galib::internal::CircularBuffer< GeneType >.
Referenced by galib::internal::MpiCommunicator< GeneType >::update().