|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include <Population.h>
Public Types | |
| typedef Individual_t::genes_t | genes_t |
| typedef std::shared_ptr< Individual_t > | individual |
| typedef std::pair< unsigned int, individual > | ind_t |
| typedef std::map< unsignedint, individual >::iterator | indItr_t |
| population iterator type | |
Public Member Functions | |
| Population () | |
| ~Population () | |
| unsigned int | add_individual (individual ind) |
| void | remove_individual (individual ind) |
| individual | get_individual (int identity) |
| individual | get_staging (int identity) |
| void | commit_individuals (std::set< unsigned int > ids) |
| void | keepSurvivors (std::set< unsigned int > survivors) |
| bool | isRepresentedInPopulation (genes_t ind_genes) |
| check if a gene set is already represented in the population | |
| double | computeHypervolume (size_t island_id, const std::vector< double > &referencePoint) |
| void | commit_individuals () |
| indItr_t | stagingBegin () |
| iterator begin on staging area | |
| indItr_t | stagingEnd () |
| iterator end on staging area | |
| unsigned int | size () const |
| indItr_t | begin () |
| iterator begin on population container | |
| indItr_t | end () |
| iterator end on population container | |
| indItr_t | erase (indItr_t it) |
| erase individual | |
Private Member Functions | |
| unsigned int | getFreeID () |
Private Attributes | |
| std::map< unsigned int, individual > | individuals |
| population container holding all individuals | |
| std::map< unsigned int, individual > | stagingArea |
| staging area for individuals probably joining population | |
| std::queue< unsigned int > | freeids |
| queue to handle free individual IDs | |
| unsigned int | last_identity |
| last used (= next free) ID | |
Definition at line 44 of file Population.h.
| typedef Individual_t::genes_t Population< Individual_t >::genes_t |
Definition at line 53 of file Population.h.
| typedef std::pair< unsigned int, individual > Population< Individual_t >::ind_t |
Definition at line 55 of file Population.h.
| typedef std::map<unsignedint,individual>::iterator Population< Individual_t >::indItr_t |
population iterator type
Definition at line 58 of file Population.h.
| typedef std::shared_ptr<Individual_t> Population< Individual_t >::individual |
Definition at line 54 of file Population.h.
|
inline |
Definition at line 47 of file Population.h.
References last_identity.
|
inline |
Definition at line 51 of file Population.h.
|
inline |
Adds an individual to the population
| ind | an individual that will be added to the population |
Definition at line 65 of file Population.h.
References getFreeID(), and stagingArea.
|
inline |
iterator begin on population container
Definition at line 225 of file Population.h.
References individuals.
|
inline |
Definition at line 206 of file Population.h.
References individuals, and stagingArea.
|
inline |
Definition at line 131 of file Population.h.
References get_staging(), individuals, and stagingArea.
|
inline |
Definition at line 176 of file Population.h.
References Hypervolume::FromFile(), and individuals.
|
inline |
iterator end on population container
Definition at line 227 of file Population.h.
References individuals.
|
inline |
|
inline |
Get an individual of the current population with a specific ID
| identity | an ID of the individual in the population |
Definition at line 98 of file Population.h.
References individuals.
|
inline |
Get an individual of the 'stagingArea' with a specific ID
| identity | an ID of the individual in the stagingArea |
Definition at line 117 of file Population.h.
References stagingArea.
Referenced by commit_individuals().
|
inlineprivate |
Manages free individual IDs
Definition at line 249 of file Population.h.
References freeids, and last_identity.
Referenced by add_individual().
|
inline |
check if a gene set is already represented in the population
Definition at line 165 of file Population.h.
References individuals.
|
inline |
Remove all non-surviving individuals from the population and put IDs back in pool of free IDs.
| survivors | to keep for next generation |
Definition at line 146 of file Population.h.
References freeids, individuals, and last_identity.
|
inline |
Definition at line 74 of file Population.h.
References freeids, last_identity, and stagingArea.
|
inline |
Size of population
Definition at line 222 of file Population.h.
References individuals.
|
inline |
|
inline |
|
private |
queue to handle free individual IDs
Definition at line 240 of file Population.h.
Referenced by getFreeID(), keepSurvivors(), and remove_individual().
|
private |
population container holding all individuals
Definition at line 234 of file Population.h.
Referenced by begin(), commit_individuals(), commit_individuals(), computeHypervolume(), end(), erase(), get_individual(), isRepresentedInPopulation(), keepSurvivors(), and size().
|
private |
last used (= next free) ID
Definition at line 243 of file Population.h.
Referenced by getFreeID(), keepSurvivors(), Population(), and remove_individual().
|
private |
staging area for individuals probably joining population
Definition at line 237 of file Population.h.
Referenced by add_individual(), commit_individuals(), commit_individuals(), get_staging(), remove_individual(), stagingBegin(), and stagingEnd().