48 const MatrixType const_matrix = MatrixType::Random();
51 rows = MatrixType::RowsAtCompileTime,
52 cols = MatrixType::ColsAtCompileTime,
81 VERIFY_IS_EQUAL((const_matrix.template topLeftCorner<r, c>()), (const_matrix.template block<r, c>(0, 0)));
82 VERIFY_IS_EQUAL((const_matrix.template topRightCorner<r, c>()), (const_matrix.template block<r, c>(0,
cols -
c)));
83 VERIFY_IS_EQUAL((const_matrix.template bottomLeftCorner<r, c>()), (const_matrix.template block<r, c>(
rows -
r, 0)));
85 (const_matrix.template block<r, c>(
rows -
r,
cols -
c)));
88 (const_matrix.template topLeftCorner<r, Dynamic>(
r,
c)));
90 (const_matrix.template topRightCorner<r, Dynamic>(
r,
c)));
92 (const_matrix.template bottomLeftCorner<r, Dynamic>(
r,
c)));
94 (const_matrix.template bottomRightCorner<r, Dynamic>(
r,
c)));
97 (const_matrix.template topLeftCorner<Dynamic, c>(
r,
c)));
99 (const_matrix.template topRightCorner<Dynamic, c>(
r,
c)));
101 (const_matrix.template bottomLeftCorner<Dynamic, c>(
r,
c)));
103 (const_matrix.template bottomRightCorner<Dynamic, c>(
r,
c)));
105 VERIFY_IS_EQUAL((const_matrix.template topRows<r>()), (const_matrix.template block<r, cols>(0, 0)));
106 VERIFY_IS_EQUAL((const_matrix.template middleRows<r>(sr)), (const_matrix.template block<r, cols>(sr, 0)));
107 VERIFY_IS_EQUAL((const_matrix.template bottomRows<r>()), (const_matrix.template block<r, cols>(
rows -
r, 0)));
108 VERIFY_IS_EQUAL((const_matrix.template leftCols<c>()), (const_matrix.template block<rows, c>(0, 0)));
109 VERIFY_IS_EQUAL((const_matrix.template middleCols<c>(sc)), (const_matrix.template block<rows, c>(0, sc)));
110 VERIFY_IS_EQUAL((const_matrix.template rightCols<c>()), (const_matrix.template block<rows, c>(0,
cols -
c)));