AIMA.Core.Util.Math.Matrix.constructWithCopy C# (CSharp) Méthode

constructWithCopy() public static méthode

public static constructWithCopy ( double A ) : Matrix
A double
Résultat Matrix
	public static Matrix constructWithCopy(double[][] A) {
        int m = A.Length;
        int n = A[0].Length;
		Matrix X = new Matrix(m, n);
		double[][] C = X.getArray();
		for (int i = 0; i < m; i++) {
            if (A[i].Length != n)
            {
				throw new ArgumentOutOfRangeException(
						"All rows must have the same length.");
			}
			for (int j = 0; j < n; j++) {
				C[i][j] = A[i][j];
			}
		}
		return X;
	}