GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
Loading...
Searching...
No Matches
include
algorithms
cellular
selection
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
8
namespace
galib
{
9
18
template
<
typename
GeneType>
19
class
LocalSelection
{
20
public
:
24
virtual
~LocalSelection
() =
default
;
25
37
virtual
const
Individual<GeneType>
&
select
(
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
Population.h
galib::Individual
Represents a single candidate solution in the population.
Definition
Individual.h:23
galib::LocalSelection
Abstract interface for neighbourhood-based parent selection in a cellular GA.
Definition
LocalSelection.h:19
galib::LocalSelection::select
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.
galib::LocalSelection::~LocalSelection
virtual ~LocalSelection()=default
Virtual destructor for polymorphic use.
galib::Population
A container for a group of individuals in the genetic algorithm.
Definition
Population.h:24
galib
Definition
Algorithm.h:11
Generated by
1.9.8