示例#1
0
  public static Matrix matrixCopy(Matrix matrix) { // 矩阵复制
    int i, j;
    Matrix matrix_copy = new Matrix();

    matrix_copy.setLine(matrix.getLine());
    matrix_copy.setRow(matrix.getRow());
    matrix_copy.setAccuracy(matrix.getAccuracy());
    matrix_copy.setName(matrix.getName());
    for (i = 0; i < matrix.getLine(); i++)
      for (j = 0; j < matrix.getRow(); j++) matrix_copy.setMatrixArray(matrix.getMatrixArray());
    return matrix_copy;
  }
示例#2
0
 public Matrix(Matrix matrix) {
   this.matrixArray = Matrix.matrixArrayCopy(matrix.getMatrixArray());
   this.line = matrix.getLine();
   this.row = matrix.getRow();
   this.accuracy = matrix.getAccuracy();
 }