Revision b5f89f32
| utility/matrix.h | ||
|---|---|---|
| 155 | 155 |
Vector<N> row = row_to_vector(i); |
| 156 | 156 |
for (int j = 0; j < N; j++) |
| 157 | 157 |
{
|
| 158 |
ret.cell(i, j) = row.dot(m.col_to_vector(j));
|
|
| 158 |
ret(i, j) = row.dot(m.col_to_vector(j)); |
|
| 159 | 159 |
} |
| 160 | 160 |
} |
| 161 | 161 |
return ret; |
| 162 | 162 |
} |
| 163 | 163 |
|
| 164 |
Matrix transpose() |
|
| 164 |
Matrix transpose() const
|
|
| 165 | 165 |
{
|
| 166 | 166 |
Matrix ret; |
| 167 |
for(int x = 0; x < N; x++)
|
|
| 167 |
for (int i = 0; i < N; i++)
|
|
| 168 | 168 |
{
|
| 169 |
for(int y = 0; y < N; y++)
|
|
| 169 |
for (int j = 0; j < N; j++)
|
|
| 170 | 170 |
{
|
| 171 |
ret.cell(y, x) = cell(x, y);
|
|
| 171 |
ret(j, i) = cell(i, j);
|
|
| 172 | 172 |
} |
| 173 | 173 |
} |
| 174 | 174 |
return ret; |
Also available in: Unified diff