PIVector reshape and etc...
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user