PIVector reshape and etc...

This commit is contained in:
2021-07-16 14:11:55 +03:00
parent 040eb3b279
commit 856a9b80ea
5 changed files with 76 additions and 236 deletions

View File

@@ -50,10 +50,11 @@ public:
inline PIVector2D(size_t rows, size_t cols, PIVector<T> && v) : rows_(rows), cols_(cols), mat(std::move(v)) {
mat.resize(rows*cols);
}
inline PIVector2D(const PIVector<PIVector<T> > & v) {
inline PIVector2D(const PIVector<PIVector<T>> & v) {
rows_ = v.size();
if (rows_) {
cols_ = v[0].size();
mat.reserve(rows_*cols_);
for (size_t i = 0; i < rows_; i++) {
mat.append(v[i]);
}