| 154 |
|
return tmp; |
| 155 |
|
} |
| 156 |
|
|
| 157 |
– |
|
| 157 |
|
/** Tests if this matrix is symmetrix. */ |
| 158 |
|
bool isSymmetric() const { |
| 159 |
|
for (unsigned int i = 0; i < Dim - 1; i++) |
| 181 |
|
return false; |
| 182 |
|
|
| 183 |
|
return true; |
| 184 |
+ |
} |
| 185 |
+ |
|
| 186 |
+ |
/** |
| 187 |
+ |
* Returns a column vector that contains the elements from the |
| 188 |
+ |
* diagonal of m in the order R(0) = m(0,0), R(1) = m(1,1), and so |
| 189 |
+ |
* on. |
| 190 |
+ |
*/ |
| 191 |
+ |
Vector<Real, Dim> diagonals() const { |
| 192 |
+ |
Vector<Real, Dim> result; |
| 193 |
+ |
for (unsigned int i = 0; i < Dim; i++) { |
| 194 |
+ |
result(i) = this->data_[i][i]; |
| 195 |
+ |
} |
| 196 |
+ |
return result; |
| 197 |
|
} |
| 198 |
|
|
| 199 |
|
/** Tests if this matrix is the unit matrix. */ |