-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdministradorDeGen.h
55 lines (42 loc) · 1.21 KB
/
AdministradorDeGen.h
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
#ifndef ADMINISTRADORDEGENH
#define ADMINISTRADORDEGENH
#include "Gen.h"
//SOLO EN VISUAL
#include "gen.cpp"
class AdministradorDeGen
{
private:
unsigned int maximoDeCargaGenetica;
unsigned int indice;
public:
// Constructores y destructor
/**
* pre: maximoDeCargaGenetica tiene que ser mayor a 0.
* pos: setea el indice en 1 y el maximo de la carga genetica
*/
AdministradorDeGen(unsigned int maximoDeCargaGenetica);
/**
* pre: -
* pos: elimina la memoria dinamica del administrador de gen.
*/
virtual ~AdministradorDeGen();
// Getters
/**
* pre: -
* pos: devuelve el indice del aministrador de gen
*/
unsigned int getIndice();
// Setters
/**
* pre: -
* pos: le suma 1 a el indice del administrador de gen
*/
void setMasUnoIndice();
// Funciones
/**
* pre: que los genes no sean nulos
* pos: devuelve un gen con maximoDeCargaGenetica en "maximoDeCargaGenetica" y cargaGenetica como el promedio
*/
Gen generar(unsigned int gen1, unsigned int gen2, unsigned int gen3);
};
#endif /* ADMINISTRADORDEGENH */