pub fn transpose(&self) -> Matrix {
        let mut result = Matrix::zeros(self.ncols, self.nrows);

        for j in 0..result.ncols {
            for i in 0..result.nrows {
                result.set(i, j, self.get(j, i));
            }
        }

        result
    }
/// Transpose.
///
/// Avoid at all costs!  It's slow!  If these are taking a lot of time, add a better algorithm.
Transpose.
Avoid at all costs.  It's slow.  If these are taking a lot of time, add a better algorithm.
Transpose . Avoid at all costs . It ' s slow . If these are taking a lot of time add a better algorithm .
pub fn transpose(&self) -> Matrix {
        let mut result = Matrix::zeros(self.ncols, self.nrows);
        for j in 0..result.ncols {
            for i in 0..result.nrows {
                result.set(i, j, self.get(j, i));
            }
        }
        result
    }
pub fn transpose ( & self ) -> Matrix { let mut result = Matrix :: zeros ( self . ncols , self . nrows ) ; for j in 0 .. result . ncols { for i in 0 .. result . nrows { result . set ( i , j , self . get ( j , i ) ) ; } } result }
Transpose.
Transpose .
&self