184 |
|
return true; |
185 |
|
} |
186 |
|
|
187 |
+ |
/** |
188 |
+ |
* Returns a column vector that contains the elements from the |
189 |
+ |
* diagonal of m in the order R(0) = m(0,0), R(1) = m(1,1), and so |
190 |
+ |
* on. |
191 |
+ |
*/ |
192 |
+ |
Vector<Real, Dim> diagonals() const { |
193 |
+ |
Vector<Real, Dim> result; |
194 |
+ |
for (unsigned int i = 0; i < Dim; i++) { |
195 |
+ |
result(i) = this->data_[i][i]; |
196 |
+ |
} |
197 |
+ |
return result; |
198 |
+ |
} |
199 |
+ |
|
200 |
|
/** Tests if this matrix is the unit matrix. */ |
201 |
|
bool isUnitMatrix() const { |
202 |
|
if (!isDiagonal()) |