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 .