GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
Loading...
Searching...
No Matches
DemeSelector.h
Go to the documentation of this file.
1#ifndef DEME_SELECTOR_H
2#define DEME_SELECTOR_H
3
4#pragma once
5
6#include "core/Individual.h"
7#include "core/Population.h"
8#include <vector>
9
10namespace galib {
11
20 template<typename GeneType>
22 public:
23 virtual ~DemeSelector() = default;
24
32 virtual std::vector<Individual<GeneType>> selectDeme(
33 const Population<GeneType>& population,
34 std::size_t count
35 ) const = 0;
36 };
37
38}
39
40#endif // DEME_SELECTOR_H
Interface for choosing individuals to migrate out of the island.
virtual ~DemeSelector()=default
virtual std::vector< Individual< GeneType > > selectDeme(const Population< GeneType > &population, std::size_t count) const =0
Selects individuals for migration.
A container for a group of individuals in the genetic algorithm.
Definition Population.h:24