@@ -13,7 +13,7 @@ Chart::Chart(QObject *parent) : QObject(parent) {
13
13
dataUpdater.setSingleShot (true );
14
14
QObject::connect (&dataUpdater, &QTimer::timeout, this , &Chart::updateAllSeries);
15
15
16
- matrix = new MatrixXd (250 ,24 );
16
+ matrix = new MatrixXd (250 , 24 );
17
17
}
18
18
19
19
void Chart::startUpdating (const QList<QLineSeries *> &seriesList, const QVector<qreal> &values, qreal windowWidth,
@@ -25,7 +25,7 @@ void Chart::startUpdating(const QList<QLineSeries *> &seriesList, const QVector<
25
25
}
26
26
27
27
auto valuesVector = std::vector<qreal>(values.begin (), values.end ());
28
- RowVectorXd vector = Map<RowVectorXd, Unaligned>(valuesVector.data (), (long )valuesVector.size ());
28
+ RowVectorXd vector = Map<RowVectorXd, Unaligned>(valuesVector.data (), (long ) valuesVector.size ());
29
29
// cout << vector << endl;
30
30
31
31
c_seriesList = seriesList;
@@ -91,20 +91,16 @@ void Chart::updateAllSeries() {
91
91
matrix = new MatrixXd (250 , 24 );
92
92
}
93
93
94
- void Chart::removeZeroRows (Eigen::MatrixXd& mat)
95
- {
94
+ void Chart::removeZeroRows (Eigen::MatrixXd &mat) {
96
95
Matrix<bool , Dynamic, 1 > empty = (mat.array () == 0 ).rowwise ().all ();
97
96
98
97
auto last = mat.rows () - 1 ;
99
- for (long i = 0 ; i < last + 1 ;)
100
- {
101
- if (empty (i))
102
- {
98
+ for (long i = 0 ; i < last + 1 ;) {
99
+ if (empty (i)) {
103
100
mat.row (i).swap (mat.row (last));
104
101
empty.segment <1 >(i).swap (empty.segment <1 >(last));
105
102
--last;
106
- }
107
- else {
103
+ } else {
108
104
++i;
109
105
}
110
106
}
0 commit comments