-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindividual.h
More file actions
37 lines (30 loc) · 1.56 KB
/
individual.h
File metadata and controls
37 lines (30 loc) · 1.56 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
/*
*Coded by Luis Felipe Ariza Vesga
*Universidad Nacional de Colombia
*EURECOM
*2017
*lfarizav@unal.edu.co, ariza@eurecom.fr
*(' .-. .-. .-. .-. .--. .-.
*(' | } { | | \{ | / {} \ } |
*(' \ `-' / | }\ { / /\ \ } '--.
*(' `---' `-' `-' `-' `-' `----'
*(' ,----, ,-, ,-. ,---. .----. .----. .---. .-. .-.
*(' } |__} | } { | } }}_} } |__} | }`-' / {-. \ } \/ {
*(' } '__} \ `-' / | } \ } '__} | },-. \ '-} / | { } |
*(' `----' `---' `-'-' `----' `----' `---' `-' `-'
*/
//#include "SIMULATION/TOOLS/xxx.h" user xxx.h file
#include"defs.h"
// Create a random individual
void generateIndividual(struct individual* indivPtr,struct individual* OneElementeIndividualPtr, long size);
void generateIndividualZero(struct individual* indivPtr,struct individual* OneElementeIndividualPtr, long size);
/* Getters and setters */
// Use this if you want to create individuals with different gene lengths
void setDefaultGeneLength(struct individual* indivPtr, long length);
unsigned long getGene(struct individual* indivPtr, unsigned long index);
void setGene(struct individual* indivPtr, unsigned long index, char value);
/* Public methods */
long sizeGenes(struct individual indiv);
void getFitnessIndividual(struct individual* indivPtr,struct individual* OneElementeIndividualPtr);
void toStringIndividual(struct individual* indivPtr);
void init_individual(struct individual* indivPtr, long size);