-
Notifications
You must be signed in to change notification settings - Fork 0
/
neural_map.h
42 lines (36 loc) · 844 Bytes
/
neural_map.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
//Réseau de neuronne Self Organizing Map
//Neural_map header
#ifndef H_NEURAL_MAP
#define H_NEURAL_MAP
//Grille
typedef struct grille
{
int nb_column;
int nb_line;
int **_rect; // Grille de neurone
size_t* nb_voisin;
}grille;
//vecteur de neurones
typedef struct neural_m
{
double *mem; // Vecteur de poids
double act; // Distance euclidienne
char *nom;
}neural_m;
typedef struct BMU
{
int* best_indice;
int nb_bmu;
}BMU;
grille initGrid(int);
void resetGrid(int**, int, int);
void printGrid(int**, int, int);
void initNeuralMap(neural_m**, double*, int);
void printIntVec(int *, size_t);
void printVecNeuralMap(neural_m**, int);
int * voisinage(int, int, grille);
void apprendre(neural_m**, data_v*, double, int*, size_t);
BMU* getBMU(neural_m**, data_v*, int);
void readll(BMU*);
//void addToBMU(BMU*);
#endif