Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
clausnagel committed Jan 3, 2025
1 parent 92114c3 commit 5c60de1
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,20 +349,6 @@ public Matrix copy() {
return new Matrix(this);
}

public boolean isEqual(Matrix matrix) {
if (matrix.rows == rows && matrix.columns == columns) {
for (int i = 0; i < rows; i++) {
if (!Arrays.equals(elements[i], matrix.elements[i])) {
return false;
}
}

return true;
} else {
return false;
}
}

private void checkDimensions(Matrix matrix) {
if (matrix.rows != rows || matrix.columns != columns) {
throw new IllegalArgumentException("Matrix dimensions must agree.");
Expand Down

0 comments on commit 5c60de1

Please sign in to comment.