GA Information display. More...
#include <qrgamonitor.h>
Inheritance diagram for QRGAMonitor:
Collaboration diagram for QRGAMonitor:
Public Member Functions | |
QRGAMonitor (QWidget *parent=0) | |
void | setParams (size_t maxgen, double minfit, double maxfit) |
void | setGenInfo (const size_t gen, const size_t best, const double value) |
void | clear (void) |
virtual | ~QRGAMonitor (void) |
Protected Member Functions | |
double | x (size_t x) |
double | y (double y) |
void | repaint (void) |
virtual void | resizeEvent (QResizeEvent *event) |
Private Attributes | |
void * | Ui |
QGraphicsScene | Scene |
size_t | MaxGen |
double | MinFit |
double | MaxFit |
double | XScale |
double | YScale |
QList< double > | Values |
Detailed Description
GA Information display.
The QRGAMonitor class provides a widget to display information about the GA who is working, like the number of generation or a graph with the evolution of the fitnesses.
Constructor & Destructor Documentation
QRGAMonitor | ( | QWidget * | parent = 0 | ) |
Construct the information display.
- Parameters
-
parent Parent of the widget.
|
virtual |
Destructor.
Member Function Documentation
void setParams | ( | size_t | maxgen, |
double | minfit, | ||
double | maxfit | ||
) |
Set the parameters.
- Parameters
-
maxgen Maximum number of generations. minfit Minimum value of the fitness. maxfit Maximum value of the fitness.
void setGenInfo | ( | const size_t | gen, |
const size_t | best, | ||
const double | value | ||
) |
Receive generation information.
- Parameters
-
gen Actual Generation. best Age of the best chromosome. value Value of the best chromosome.
void clear | ( | void | ) |
Clear all the information displayed.
|
protected |
- Returns
- the X-coordinate in the scene.
- Parameters
-
x X-coordinate in the problem.
|
protected |
- Returns
- the Y-coordinate in the scene.
- Parameters
-
y Y-coordinate in the problem.
|
protected |
The widget has changed and has to be repainted.
|
protectedvirtual |
Resize event method.
- Parameters
-
event Event.
Member Data Documentation
|
private |
|
private |
The scene.
|
private |
Maximal number of generations.
|
private |
Maximal fitness.
|
private |
Maximal fitness.
|
private |
Ratio to adapt the widths of the objects of the scene to the actual width of the widget.
|
private |
Ratio to adapt the heights of the objects of the scene to the actual height of the widget.
|
private |
The list of values received.