-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathw_plot_Neuron.h
executable file
·113 lines (80 loc) · 2.18 KB
/
w_plot_Neuron.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#ifndef W_PLOT_MFR_H
#define W_PLOT_MFR_H
class QwtPlotItem;
class QwtPlotCurve;
class QwtLegend;
class QwtPlot;
class QwtPointSeriesData;
class QVBoxLayout;
class w_MainWindow;
class Layer;
class NeuralNet;
class graph_Simulation;
#include <QWidget>
class w_plot_Neuron : public QWidget
{
Q_OBJECT
public:
explicit w_plot_Neuron(QWidget *parent = 0);
virtual ~w_plot_Neuron();
/*virtual*/ QSize sizeHint () const;
virtual void init(w_MainWindow* aMainWindow, graph_Simulation* aGraph_simulation);
virtual void setNumPoints() {}
protected:
void alignScales();
virtual void setupPlot();
void setupCurves();
virtual void initData();
virtual void initSamples() {}
signals:
public slots:
virtual void refreshPlot() = 0;
void showCurve(QwtPlotItem *, bool on);
protected:
virtual void refreshData(int pt, int neuron, const Layer *pL) {}
protected:
w_MainWindow* mainWindow;
graph_Simulation* graph_sim;
NeuralNet* bestNet;
QVBoxLayout *layout;
QwtPlot* plot;
QVector<QwtPlotCurve*> curves;
QwtLegend *legend;
QVector<QwtPointSeriesData*> datas;
QVector< QVector<QPointF> > samples;
int numberPoints;
};
class w_plot_MFR : public w_plot_Neuron
{
Q_OBJECT
public:
explicit w_plot_MFR(QWidget *parent = 0);
/*virtual*/ ~w_plot_MFR();
/*virtual*/ void init(w_MainWindow* aMainWindow, graph_Simulation* aGraph_simulation);
/*virtual*/ void setNumPoints();
protected:
/*virtual*/ void setupPlot();
/*virtual*/ void initSamples();
public slots:
/*virtual*/ void refreshPlot();
protected:
/*virtual*/ void refreshData(int pt, int neuron, const Layer *pL);
};
class w_plot_Pot : public w_plot_Neuron
{
Q_OBJECT
public:
explicit w_plot_Pot(QWidget *parent = 0);
/*virtual*/ ~w_plot_Pot();
/*virtual*/ void init(w_MainWindow* aMainWindow, graph_Simulation* aGraph_simulation);
/*virtual*/ void setNumPoints();
protected:
/*virtual*/ void setupPlot();
/*virtual*/ void initSamples();
public slots:
/*virtual*/ void refreshPlot();
protected:
/*virtual*/ void refreshData(int pt, int neuron, const Layer *pL);
private:
};
#endif // W_PLOT_MFR_H