#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 copyFrom(std::shared_ptr> x); void zeroSelf(); size_t nRow() { return this->size(); } size_t nCol() { return this->at(0)->size(); } }; template inline void RowTypeMatrix::copyFrom(std::shared_ptr> x) { for (size_t i = 0; i < x->size(); i++) { this->at(i)->copyFrom(x->at(i)); } } template <> inline void RowTypeMatrix< std::shared_ptr>>::zeroSelf() { for (size_t i = 0; i < this->size(); i++) { this->at(i)->zeroSelf(); } } }