mirror of
https://github.com/Relintai/pmlpp.git
synced 2024-11-08 13:12:09 +01:00
Fix logic in MLPPMatrix's remove_row_unordered.
This commit is contained in:
parent
3eff399d6b
commit
d0c86c918d
@ -154,10 +154,12 @@ void MLPPMatrix::remove_row_unordered(int p_index) {
|
||||
}
|
||||
|
||||
int start_ind = p_index * _size.x;
|
||||
int end_ind = (p_index + 1) * _size.x;
|
||||
int last_row_start_ind = _size.y * _size.x;
|
||||
|
||||
for (int i = start_ind; i < end_ind; ++i) {
|
||||
_data[i] = _data[ds + i];
|
||||
if (start_ind != last_row_start_ind) {
|
||||
for (int i = 0; i < _size.x; ++i) {
|
||||
_data[start_ind + i] = _data[last_row_start_ind + i];
|
||||
}
|
||||
}
|
||||
|
||||
_data = (real_t *)memrealloc(_data, data_size() * sizeof(real_t));
|
||||
|
Loading…
Reference in New Issue
Block a user