-
Notifications
You must be signed in to change notification settings - Fork 0
/
som_app.h
56 lines (45 loc) · 1.02 KB
/
som_app.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
56
#ifndef SOM_APP_H
#define SOM_APP_H
#include <QMainWindow>
#include <QtCore>
#include <QtGui>
#include <QGraphicsScene>
#include <QGraphicsPixmapItem>
#include <som.h>
namespace Ui {
class som_app;
}
class som_app : public QMainWindow
{
Q_OBJECT
public:
explicit som_app(QWidget *parent = 0);
~som_app();
private slots:
void on_pushButton_clicked();
void on_start_algo_clicked();
private:
Ui::som_app *ui;
QGraphicsScene* scene;
QImage* image;
QPixmap pixmap;
QGraphicsPixmapItem* pixmapitem;
QVector < QPair<int,int> > dots;
int rad;
int grid_size;
int cell_size;
int n0;
int nmax;
double alpha;
double amin;
double change_radius;
som* net;
void draw_nets(QVector < QPair<int,int> > v,int grid_size);
int generate_index_of_dot();
double a(int n);
double eta (int n, int ibmu, int jbmu,int i,int j);
bool is_in_radius(QPair<int,int> fire_dot, QPair<int,int> fired_dot);
void start_algo();
void redraw();
};
#endif // SOM_APP_H