File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,8 @@ class Matrix {
182
182
183
183
[[nodiscard]] Matrix getSubMatrix (const std::list<unsigned int > &indices) const ;
184
184
185
+ [[nodiscard]] virtual std::shared_ptr<Matrix> getSubMatrixPtr (const std::list<unsigned int > &indices) const ;
186
+
185
187
[[nodiscard]] Matrix getSubMatrixNonSquare (const std::list<unsigned int > &indices) const ;
186
188
187
189
/* *
Original file line number Diff line number Diff line change @@ -608,6 +608,12 @@ Matrix Matrix::getSubMatrix(const std::list<unsigned int> &indices) const {
608
608
return this ->getSubMatrix (indices, indices);
609
609
}
610
610
611
+ std::shared_ptr<Matrix> Matrix::getSubMatrixPtr (const std::list<unsigned int > &indices) const {
612
+ assert (this ->getRows () == this ->getCols ());
613
+ return this ->getSubMatrixPtr (indices, indices);
614
+ }
615
+
616
+
611
617
/* *
612
618
* Make sub matrix with indices in list for non-square matrix. The new matrix only keeps the columns
613
619
* of the original matrix with the selected indices.
You can’t perform that action at this time.
0 commit comments