ph-math/src/main/java/com/helger/numbercruncher/matrix/Matrix.java
public Matrix transpose ()
  {
    final float tv[][] = new float [m_nCols] [m_nRows]; // transposed values

    // Set the values of the transpose.
    for (int r = 0; r < m_nRows; ++r)
    {
      for (int c = 0; c < m_nCols; ++c)
      {
        tv[c][r] = m_aValues[r][c];
      }
    }

    return new Matrix (tv);
  }
public Matrix transpose ()
  {
    final float tv[][] = new float [m_nCols] [m_nRows]; // transposed values

    // Set the values of the transpose.
    for (int r = 0; r < m_nRows; ++r)
    {
      for (int c = 0; c < m_nCols; ++c)
      {
        tv[c][r] = m_aValues[r][c];
      }
    }

    return new Matrix (tv);
  }
public Matrix transpose ( ) { final float tv [ ] [ ] = new float [ m_nCols ] [ m_nRows ] ; // transposed values // Set the values of the transpose. for ( int r = 0 ; r < m_nRows ; ++ r ) { for ( int c = 0 ; c < m_nCols ; ++ c ) { tv [ c ] [ r ] = m_aValues [ r ] [ c ] ; } } return new Matrix ( tv ) ; }
Return the transpose of this matrix.

@return the transposed matrix
Return the transpose of this matrix .