Estimation DLL, matrix library: fixed bug in MatrixView::setAll()

time-shift
Sébastien Villemot 2010-02-18 15:37:37 +01:00
parent 4f7ef5f49d
commit 9ac6553776
1 changed files with 2 additions and 2 deletions

View File

@ -109,8 +109,8 @@ class MatrixView
inline const double *getData() const { return data; }
inline void setAll(double val)
{
for (double *p = data; p < data + rows*ld; p += ld)
std::fill_n(p, cols, val);
for (double *p = data; p < data + cols*ld; p += ld)
std::fill_n(p, rows, val);
}
inline double &operator() (size_t i, size_t j) { return data[i+j*ld]; }
inline const double &operator() (size_t i, size_t j) const { return data[i+j*ld]; }