Loading [MathJax]/extensions/tex2jax.js

dune-composites (unstable)

transpose.hh
1#ifndef _transpose_hh
2#define _transpose_hh
3
4namespace Dune{
5 namespace Composites{
6
7 template <typename X, int n>
8 void transpose(const X& x, X& xt)
9 {
10 for (int i = 0; i < n; i++){
11 for (int j = 0; j < n; j++){
12 xt[i][j] = x[j][i];
13 }
14 }
15 }
16
17 template <typename X, int m, int n>
18 void transpose(const X& x, X& xt)
19 {
20 for (int i = 0; i < m; i++){
21 for (int j = 0; j < n; j++){
22 xt[i][j] = x[j][i];
23 }
24 }
25 }
26
27 }
28}
29
30#endif
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 5, 23:02, 2025)