Java Matrix Transpose transpose(double[] m)

Here you can find the source of transpose(double[] m)

Description

Turns columns into rows and rows into columns.

License

BSD License

Declaration

public static double[] transpose(double[] m) 

Method Source Code

//package com.java2s;
//License from project: BSD License 

public class Main {
    /**/*www .  ja v a 2  s . c o m*/
     * Turns columns into rows and rows into columns.
     */
    public static double[] transpose(double[] m) {
        return new double[] { m[0], m[4], m[8], m[12], m[1], m[5], m[9], m[13], m[2], m[6], m[10], m[14], m[3],
                m[7], m[11], m[15] };
    }
}

Related

  1. transpose(boolean[][] inputMatrix)
  2. transpose(boolean[][] matrix)
  3. transpose(boolean[][] toBeTransposed)
  4. transpose(byte[][] d)
  5. transpose(double array[], int W, int H, int D)
  6. transpose(double[][] A)
  7. transpose(double[][] arr)
  8. transpose(double[][] ary)
  9. transpose(double[][] in)