next up previous contents
Next: Fixed size vector outer Up: Fixed size matrices Previous: Rescaling a fixed size   Contents

Transposing a fixed size matrix

Explicit matrix transposition is not often required in Gandalf, because of the extensive support for implicit transpose in other matrix operations. However where necessary, computing the transpose can be achieved using
      Gan_Matrix33 m33A, m33B;

      /* set up m33A using e.g. gan_mat33_fill_q() */
      gan_mat33_tpose_q ( &m33A, &m33B ); /* B = A^T */
      m33B = gan_mat33_tpose_s ( &m33A ); /* B = A^T */
      gan_mat33_tpose_i ( &m33A ); /* A = A^T, result in-place in A */



2006-03-17