Add Grid::fill()
This commit is contained in:
parent
ab7aa394dc
commit
ae99d41cf4
|
@ -53,6 +53,14 @@ class Grid
|
||||||
{
|
{
|
||||||
return rowNo * nColumns_ + data_.get();
|
return rowNo * nColumns_ + data_.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void fill(const T value)
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < nRows_ * nColumns_; i++)
|
||||||
|
{
|
||||||
|
data_[i] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
private:
|
private:
|
||||||
size_t nRows_;
|
size_t nRows_;
|
||||||
size_t nColumns_;
|
size_t nColumns_;
|
||||||
|
|
Loading…
Reference in New Issue