24 #ifndef EVODATAVIEWER_H
25 #define EVODATAVIEWER_H
31 #include <QListWidget>
32 #include <QGridLayout>
33 #include <QPushButton>
35 #include <QTextStream>
61 void checkMaxValue(
double val);
65 DataChunk(
const QString& label,
const QColor& color,
int size,
bool visible);
67 void setColor(QColor color);
68 void setData(
double value);
69 void setDataRaw(
double value);
70 void setDataRaw(
int ind,
double value);
73 void setRange(
double min,
double max);
74 void setLabel(
const QString& label);
75 void setStyle(
int style);
76 void setVisible(
bool vis);
78 QString getLabel()
const;
81 double getValueToDraw();
82 double getValue(
int ind);
84 double linearMap(
double x,
double rmin,
double rmax,
85 double outMin = 0,
double outMax = 1 );
91 double getZeroValue();
92 void setDPRatio(
double val);
95 bool loadRawData(
const QString& filename,
int column);
111 void restoreSelected();
112 void allOnOrAllOff();
118 QListWidget *listwidget;
120 QPushButton* deselectAll;
137 EvoDataViewer(
int nchunks,
int chunksize,
int style=0, QWidget* parent=0, Qt::WindowFlags flags=0);
140 void setChunkLabel(
int ch,
const QString& label);
141 void setChunkValue(
int ch,
double value);
142 bool setChunkValue(
const QString& name,
double value);
143 void setChunkColor(
int ch, QColor color);
144 void setCurrentStep(
int step);
145 void setStyle(
int style);
146 void setChunkRange(
int ch,
double mn,
double mx);
147 void setChunkProperties(
int ch,
double rangeMin,
double rangeMax,
const QString& label, QColor color,
bool visible);
149 void listVisibleChunks();
152 void pickUnvisible();
154 void paintEvent(QPaintEvent* evt);
155 void resizeEvent(QResizeEvent* evt);
156 void mousePressEvent(QMouseEvent* evt);
158 void updateGraphic(
int ch);
173 bool pickValueVisible;
196 double fitVal[4000][3];
210 void setValues(
int gen,
double min,
double average,
double max);
211 FitViewer( QWidget* parent=0, Qt::WindowFlags flags=0 );
212 FitViewer(
int nchunks,
int chunkSize, QWidget* parent=0, Qt::WindowFlags flags=0);
215 double getYnormValue(
double val);
216 int checkGraphRange(
double val);
219 void paintEvent(QPaintEvent* evt);
221 void setChunkLabel(
int ch,
const QString &label);
222 void setChunkProperties(
int ch,
const QString &label, QColor color,
bool visible);
223 void setChunkValue(
int ch,
int ind,
double value);
224 bool setChunkValue(
const QString& name,
int ind,
double value);
225 void diplayUntilStep(
int st);
226 void setLabels(
const QString &title,
const QString &xlabel,
const QString &ylabel);
227 bool loadRawData(
int nchunk,
const QString &filename,
int column);
228 void checkChunkRange(
int chunk);
230 int getCurrentGeneration();
FARSA_UTIL_TEMPLATE float linearMap(float x, float min=-10, float max=10, float outMin=-1, float outMax=1)
FARSA_UTIL_TEMPLATE const T max(const T &t1, const U &t2)
This file contains the common type defitions used on the whole framework.
FARSA_UTIL_TEMPLATE const T min(const T &t1, const U &t2)