copy method
Returns a deep copy of the Matrix.
Implementation
Matrix copy() {
List<List<double>> storage = [];
for (int i = 0; i < m; i++) {
storage.add(List<double>.generate(n, (j) => this[i][j]));
}
return Matrix(storage);
}
Returns a deep copy of the Matrix.
Matrix copy() {
List<List<double>> storage = [];
for (int i = 0; i < m; i++) {
storage.add(List<double>.generate(n, (j) => this[i][j]));
}
return Matrix(storage);
}