Java Matrix Clone cloneMatrix(final double[][] matrix)

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

Description

clone Matrix

License

Open Source License

Declaration

public static double[][] cloneMatrix(final double[][] matrix) 

Method Source Code

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

public class Main {

    public static double[][] cloneMatrix(final double[][] matrix) {

        final int m = matrix.length;
        int n = matrix[0].length;
        final double[][] outMatrix = new double[m][n];

        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                outMatrix[i][j] = matrix[i][j];
            }/*ww w.j a  va  2s.c  om*/
        }
        return outMatrix;
    }
}

Related

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