GALib-Parallel
Header-only C++ library for parallel evolutionary algorithms
Loading...
Searching...
No Matches
Selection.h
Go to the documentation of this file.
1#ifndef SELECTION_H
2#define SELECTION_H
3
4#pragma once
5
6#include "core/Individual.h"
7#include "core/Population.h"
8
9namespace galib {
10
19 template <typename GeneType>
20 class Selection {
21 public:
22 virtual ~Selection() = default;
23
29 virtual const Individual<GeneType>& select(const Population<GeneType>& population) = 0;
30 };
31
32}
33
34#endif // SELECTION_H
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
Interface for selection operators.
Definition Selection.h:20
virtual ~Selection()=default
virtual const Individual< GeneType > & select(const Population< GeneType > &population)=0
Selects one individual from the population.