operator / method
Implementation
Matrix2d operator /(dynamic other) {
if (other is num) {
return Matrix2d(
_rows,
_cols,
ValueVector(List.generate(_cols * _rows, (int index) {
return data!.values[index] / other;
})));
} else {
if (other is Matrix2d) {
// return Matrix2d(
// _rows,
// _cols,
// ValueVector(List.generate(_cols * _rows, (int index) {
// return data!.values[index] - other.data!.values[index];
// })));
throw UnimplementedError(
"Operation / not supported for: ${other.runtimeType}");
} else {
throw UnimplementedError(
"Operation + not supported for: ${other.runtimeType}");
}
}
}