Line | |
---|
1 | #ifndef SELECTION |
---|
2 | #define SELECTION |
---|
3 | |
---|
4 | #include "Genetic.h" |
---|
5 | |
---|
6 | /** |
---|
7 | * class that implements the turnament selection |
---|
8 | */ |
---|
9 | class Selection |
---|
10 | { |
---|
11 | public: |
---|
12 | /** |
---|
13 | * the number of chromosomes we want to select |
---|
14 | */ |
---|
15 | int count; |
---|
16 | public: |
---|
17 | /** |
---|
18 | * the constructor |
---|
19 | * |
---|
20 | * @param c the number of chromosomes we want to select |
---|
21 | */ |
---|
22 | Selection(int c = 0); |
---|
23 | |
---|
24 | /** |
---|
25 | * method that realizes the turnament selection |
---|
26 | * |
---|
27 | * @param chs the initial list of chromosomes |
---|
28 | * @param nou the final list of chromosomes (contains the selected chromosomes) |
---|
29 | */ |
---|
30 | void turnamentSelection(vector<Chromosome> chs, vector<Chromosome> & nou); |
---|
31 | }; |
---|
32 | |
---|
33 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.