PIVector2D resize

This commit is contained in:
2020-05-28 10:15:05 +03:00
parent 51a76be487
commit 6c98600fe7
3 changed files with 13 additions and 7 deletions

View File

@@ -212,6 +212,13 @@ public:
return *this;
}
inline PIVector2D<T> & resize(size_t rows, size_t cols, const T & f = T()) {
rows_ = rows;
cols_ = cols;
mat.resize(rows*cols, f);
return *this;
}
PIVector<PIVector<T> > toVectors() const {
PIVector<PIVector<T> > ret;
for(size_t i = 0; i < rows_; ++i)