| 2003 | |
| 2004 | template <typename Scalar> |
| 2005 | std::string DumpRegion(const Matrix<Scalar>& matrix, int center_row, |
| 2006 | int center_col) { |
| 2007 | static constexpr int kRadius = 20; |
| 2008 | int first_row = std::max(0, center_row - kRadius); |
| 2009 | int last_row = std::min(matrix.layout.rows - 1, center_row + kRadius); |
| 2010 | int first_col = std::max(0, center_col - kRadius); |
| 2011 | int last_col = std::min(matrix.layout.cols - 1, center_col + kRadius); |
| 2012 | std::ostringstream stream; |
| 2013 | for (int row = first_row; row <= last_row; row++) { |
| 2014 | for (int col = first_col; col <= last_col; col++) { |
| 2015 | stream << static_cast<double>(Element(matrix, row, col)) << " "; |
| 2016 | } |
| 2017 | stream << "\n"; |
| 2018 | } |
| 2019 | return stream.str(); |
| 2020 | } |
| 2021 | |
| 2022 | template <typename LhsScalar, typename RhsScalar, typename SpecType> |
| 2023 | void TestSet<LhsScalar, RhsScalar, SpecType>::VerifyTestResults() const { |
no test coverage detected