GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
Loading...
Searching...
No Matches
DemeReplacer.h
Go to the documentation of this file.
1#ifndef DEME_REPLACER_H
2#define DEME_REPLACER_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 ~DemeReplacer() = default;
24
31 virtual void replaceDeme(
32 Population<GeneType>& population,
33 std::vector<Individual<GeneType>>&& deme
34 ) const = 0;
35 };
36
37}
38
39#endif // DEME_REPLACER_H
Interface for integrating incoming migrants into the local population.
virtual void replaceDeme(Population< GeneType > &population, std::vector< Individual< GeneType > > &&deme) const =0
Replaces a portion of the local population with the given migrants.
virtual ~DemeReplacer()=default
Represents a single candidate solution in the population.
Definition Individual.h:23
A container for a group of individuals in the genetic algorithm.
Definition Population.h:24