#pragma once #include "Array.h" #include "FullRow.h" namespace MbD { template class RowTypeMatrix : public Array { public: RowTypeMatrix() {} RowTypeMatrix(std::initializer_list list) : Array{ list } {} void copy(std::shared_ptr> x); void zeroSelf(); int nRow() { return this->size(); } int nCol() { return this->at(0)->size(); } }; template inline void RowTypeMatrix::copy(std::shared_ptr> x) { for (int i = 0; i < x->size(); i++) { this->at(i)->copy(x->at(i)); } } template <> inline void RowTypeMatrix< std::shared_ptr>>::zeroSelf() { for (int i = 0; i < this->size(); i++) { this->at(i)->zeroSelf(); } } }