16 typedef float t_entry;
17 typedef QVector<t_entry> EntryVector;
77 typedef QList<DataItem> DataList;
78 typedef QList<DataItem*> DataPtrList;
79 typedef QList<DataItem*>& DataPtrListRef;
80 typedef DataList& DataListRef;
156 auto it = mData.begin();
157 while(it!=mData.end())
159 mSortedData.append(&(*it++));
165 bool isEmpty()
const {
return mData.isEmpty(); }
170 DataPtrList mSortedData;
171 QVector<float> mCumHeight;
float getMinSum() const
Returns the minimum sum of the overall dataset.
Definition: dataset.h:138
float getMaxSum() const
Returns the minimum sum of the overall dataset.
Definition: dataset.h:143
int getMaxOnsetTime() const
Returns the maximum onsettime of the overall dataset.
Definition: dataset.h:123
LayoutInfo layout
Information created during layouting.
Definition: dataset.h:40
DataPtrListRef getSortedData()
Returns a list of pointers which is sorted according to the current sorting algorithm.
Definition: dataset.h:98
t_entry max
The maximum data value in this layer.
Definition: dataset.h:65
The data set.
Definition: dataset.h:85
Responsible for loading data sets from file or generating random data to use.
Definition: fileloader.h:14
Represents a single layer of the stacked graph.
Definition: dataset.h:23
float getMaxVolatility() const
Returns the maximum volatility of the overall dataset.
Definition: dataset.h:133
int getMinOnsetTime() const
Returns the minimum onsettime of the overall dataset.
Definition: dataset.h:118
t_entry sum
The sum of all the data values in this layer.
Definition: dataset.h:61
int onsetTime
The first time point where data has a value.
Definition: dataset.h:49
int getSizeX() const
Retuns the size of the dataset in X direction, i.e.
Definition: dataset.h:108
int lastTime
The last time point where data has a value.
Definition: dataset.h:53
int maxIdx
The index of the maximum data value in the data vector.
Definition: dataset.h:69
int getSizeY() const
Returns the size of the dataset in Y direction, which is the number of layers this dataset has...
Definition: dataset.h:113
bool isEmpty() const
Returns true if the internal data set is empty, otherwise false.
Definition: dataset.h:165
QPointF labelPos
The optimal point to place the label, as determined during layouting.
Definition: dataset.h:44
t_entry volatility
The maximum data value change in this layer (used for sorting/coloring)
Definition: dataset.h:57
EntryVector data
The data values of this layer, for each time point.
Definition: dataset.h:32
QString label
A user-presentable label of the data.
Definition: dataset.h:28
Contains info for layouting.
Definition: dataset.h:9
DataListRef getData()
Returns a reference to the internal data set.
Definition: dataset.h:92
float getMinVolatility() const
Returns the minimum volatility of the overall dataset.
Definition: dataset.h:128
QString getPath() const
The path to the file where the dataset was loaded from.
Definition: dataset.h:148
int idx
The index of this DataItem in the parent DataSet (as per DataSet::getData)
Definition: dataset.h:73
void setUnsorted()
Resets the internal sorted list to the unsorted state, i.e.
Definition: dataset.h:153
QVector< float > & getCumHeight()
Returns the cumulated height at each point of the timeseries.
Definition: dataset.h:103
QColor color
The color for drawing this layer.
Definition: dataset.h:36