Java Matrix Transpose transpose(boolean[][] inputMatrix)

Here you can find the source of transpose(boolean[][] inputMatrix)

Description

transpose

License

Open Source License

Declaration

static public boolean[][] transpose(boolean[][] inputMatrix) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    static public boolean[][] transpose(boolean[][] inputMatrix) {
        int nr = inputMatrix.length;
        int nc = inputMatrix[0].length;
        boolean[][] o = new boolean[nc][nr];

        for (int i = 0; i < nr; i++) {
            for (int j = 0; j < nc; j++) {
                o[j][i] = inputMatrix[i][j];
            }//  w w  w . j  a  v a 2s.  com
        }

        return o;
    }
}

Related

  1. matrixTrans_x_diagonalMatrix(double[][] mat, double[] diag)
  2. matrixTrans_x_diagonalMatrix_x_Matrix(double[][] mat, double[] diag)
  3. matrixTrans_x_matrix(double[][] mat)
  4. matrixTransform(Object[][] datas)
  5. matrixTranspose(Object[][] matrix)
  6. transpose(boolean[][] matrix)
  7. transpose(boolean[][] toBeTransposed)
  8. transpose(byte[][] d)
  9. transpose(double array[], int W, int H, int D)