Java Matrix Clone cloneMatrix(int[][] matrix)

Here you can find the source of cloneMatrix(int[][] matrix)

Description

clone Matrix

License

Open Source License

Declaration

public static int[][] cloneMatrix(int[][] matrix) 

Method Source Code

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

public class Main {
    public static int[][] cloneMatrix(int[][] matrix) {
        int[][] clonedMatrix = new int[matrix.length][];

        for (int i = 0; i < matrix.length; i++) {
            clonedMatrix[i] = matrix[i].clone();
        }/*from   w w w.j  a va 2  s.c  om*/

        return clonedMatrix;
    }
}

Related

  1. cloneMatrix(final double[][] matrix)
  2. cloneMatrix(final double[][] src, int l1, int l2)
  3. cloneMatrix(float[] in)
  4. cloneMatrix(int[][] m)