-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGlobalOptimisationOffspring.h
More file actions
62 lines (47 loc) · 1.38 KB
/
GlobalOptimisationOffspring.h
File metadata and controls
62 lines (47 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef OPTIMISATIONOFFSPRING_H
#define OPTIMISATIONOFFSPRING_H
/*
* OptimisationMutation.h
* zContrast
*
* Created by Andrew Logsdail on 02/06/2011.
* Copyright 2011 University of Birmingham. All rights reserved.
*
*/
/**
02/06/2011
- Commented out headers inherited from Utils.h
- Imported Fitness function into this file for Roulette method
**/
// #include <cstdlib>
// #include <iostream>
// #include <vector>
// #include <string>
// #include "Structures.h"
// #include "Utils.h"
#include "GlobalOptimisationUtils.h"
class OptimisationOffspring{
public:
OptimisationOffspring() { tsize = 2; idum = NULL;}
~OptimisationOffspring() {;}
void setVariables(int *s, std::vector<std::string> *o, bool b, int tournament_size,
const std::string type, const std::string parents, const std::string fitness);
std::vector<RotationPoint> getOffspringPoints(int numberOfOffspring,
LinearStruct limits,
const std::vector<RotationPoint> points_copy);
float fitness(const int rp, const std::vector<RotationPoint> points);
private:
int *idum; // Pointer for random number generator
std::vector<std::string> *output_content; // Outputs
// MATING TYPES //
bool bOUniformCrossover;
bool bOTournament;
bool bORoulette;
bool bScreen;
// FITNESS TESTS //
bool bFExponential;
bool bFLinear;
bool bFTanh;
int tsize; //Tournament
};
#endif