diff options
Diffstat (limited to 'meowpp/math/Matrix.h')
-rw-r--r-- | meowpp/math/Matrix.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/meowpp/math/Matrix.h b/meowpp/math/Matrix.h index 09832d8..94f23a3 100644 --- a/meowpp/math/Matrix.h +++ b/meowpp/math/Matrix.h @@ -28,12 +28,15 @@ private: Myself(): rows_(0), cols_(0), entries_(0) { } + Myself(Myself const& b): rows_(b.rows_), cols_(b.cols_), entries_(b.entries_) { } + Myself(size_t r, size_t c, Entry const& e): rows_(r), cols_(c), entries_(r * c, e) { } + ~Myself() { } @@ -199,7 +202,7 @@ public: self()->entries_[self->index(r, c)] = e; return entry(r, c); } - + //! @brief Get the entry at \a r x \a c EntryRef entryGet(size_t r, size_t c) { return self()->entries_[self->index(r, c)]; @@ -351,7 +354,7 @@ public: entry(r, c, (r == c ? Entry(1) : Entry(0))); return *this; } - + /*! * @brief Let itself be an diagonal form of original itself */ @@ -364,7 +367,7 @@ public: } return *this; } - + /*! * @brief Return a matrix which is a diangonal form of me */ |