Skip to content

Commit

Permalink
Resolve #523 9 Correct "copy" constructor from a Matrix. We can just …
Browse files Browse the repository at this point in the history
…clone the realmatrix.
  • Loading branch information
johnmay committed Jan 2, 2019
1 parent b5e9bd5 commit 6a4cbc1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions legacy/src/main/java/org/openscience/cdk/math/IMatrix.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,8 @@ public IMatrix(int rows, int columns) {
public IMatrix(Matrix m) {
rows = m.rows;
columns = m.columns;
int i, j;
for (i = 0; i < rows; i++)
for (j = 0; j < columns; j++) {
realmatrix[i][j] = m.matrix[i][j];
imagmatrix[i][j] = 0d;
}
realmatrix = m.matrix.clone();
imagmatrix = new double[rows][columns];
}

/**
Expand Down

0 comments on commit 6a4cbc1

Please sign in to comment.