GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
Loading...
Searching...
No Matches
LocalSelection.h
Go to the documentation of this file.
1#ifndef LOCAL_SELECTION_H
2#define LOCAL_SELECTION_H
3
4#pragma once
5
6#include "core/Population.h"
7
8namespace galib {
9
18template <typename GeneType>
20public:
24 virtual ~LocalSelection() = default;
25
38 const Population<GeneType>& population,
39 std::size_t row,
40 std::size_t col,
41 std::size_t rows,
42 std::size_t cols
43 ) const = 0;
44};
45
46} // namespace galib
47
48#endif // LOCAL_SELECTION_H
Represents a single candidate solution in the population.
Definition Individual.h:23
Abstract interface for neighbourhood-based parent selection in a cellular GA.
virtual const Individual< GeneType > & select(const Population< GeneType > &population, std::size_t row, std::size_t col, std::size_t rows, std::size_t cols) const =0
Selects one individual from the neighbourhood of a grid cell.
virtual ~LocalSelection()=default
Virtual destructor for polymorphic use.
A container for a group of individuals in the genetic algorithm.
Definition Population.h:24