non-copy matrix block
| 34 | |
| 35 | // non-copy matrix block |
| 36 | virtual MatrixPtr<V> rowBlock(SizeR range) const { |
| 37 | if (colMajor()) CHECK_EQ(range, SizeR(0, rows())); |
| 38 | auto info = info_; |
| 39 | range.to(info.mutable_row()); |
| 40 | info.set_nnz(range.size() * cols()); |
| 41 | return MatrixPtr<V>(new DenseMatrix<V>(info, value_.segment(range*cols()))); |
| 42 | } |
| 43 | |
| 44 | virtual MatrixPtr<V> colBlock(SizeR range) const { |
| 45 | if (rowMajor()) CHECK_EQ(range, SizeR(0, cols())); |
nothing calls this directly
no test coverage detected