#include <GUINeuralNet.h>
Collaboration diagram for WeightMatrix:
Public Member Functions | |
WeightMatrix (QWidget *parent=0, const char *name=0) | |
~WeightMatrix (void) | |
void | setNet (PerceptronNetwork *net) |
void | setLayerNum (unsigned int layernum) |
unsigned int | getLayerMax (void) const |
Protected Member Functions | |
void | paintEvent (QPaintEvent *) |
Private Member Functions | |
void | paintSquare (unsigned int wx, unsigned int wy, const QColor &col) |
Private Attributes | |
unsigned int | weight_fromcount |
unsigned int | weight_tocount |
unsigned int | layernum |
unsigned int | x_needed |
unsigned int | y_needed |
PerceptronNetwork * | net |
vector< double > | thetas |
double | theta_min |
double | theta_max |
double | theta_mid |
double | theta_rng |
vector< vector< double > > | weights |
double | weight_min |
double | weight_max |
double | weight_mid |
double | weight_rng |
QPainter * | painter |
unsigned int | margin_up |
unsigned int | margin_down |
unsigned int | margin_left |
unsigned int | margin_right |
int | x_box |
int | y_box |
int | square_size_x |
int | square_size_y |
The neural network related code is encapsulated within this class, so the GUI does use only this widget and does not have to cope with the PerceptronNetwork directly.
|
Constructor which draws the weight diagramm for the weights going from layer layernum within network net.
|
|
Standard destructor. |
|
Give the maximum layer number.
|
|
QT paintEvent method, used to redraw the modified screen content. |
|
Paint a single rectangle on the rectangle plane.
|
|
Set the layer which outgoing weights will be shown
|
|
Set the PerceptronNetwork
|
|
Layer which outgoing weights will be shown |
|
Margin to the downside border of the widget, in pixels |
|
Margin to the left border of the widget, in pixels |
|
Margin to the right border of the widget, in pixels |
|
Margin to the upper border of the widget, in pixels |
|
The neural network the weight diagram is created from. |
|
The QT painter needed to (re-) draw the canvas. Initialized once upon object construction and used from there. |
|
The size of one square in x direction |
|
The size of one square in y direction |
|
Maximum theta value found in current theta vector. |
|
Middle of theta_min and theta_max. |
|
Minimum theta value found in current theta vector. |
|
Absolute range between theta_min and theta_max. |
|
The theta column values. Extracted from the neurons of the displayed layer. |
|
Hold the number of weight origins. |
|
The maximum weight found in the current weight matrix. |
|
Middle between weight_min and weight_max. |
|
The minimum weight found in the current weight matrix. |
|
Absolute distance between weight_min and weight_max. |
|
Hold the number of weight targets. |
|
The array of weight values displayed. Extracted from both the individual weights of the neurons of the current layer. |
|
The actual available pixelsize for the squares in x direction |
|
Number of squares needed in the widget in horizontal direction. Calculated as . |
|
The actual available pixelsize for the squares in y direction |
|
Number of squares needed in the widget in vertical direction. Calculated as . |