frobeniusNorm function Null safety
- AMatrix mat
Implementation
double frobeniusNorm(AMatrix mat) {
double result = 0;
for (int r = 0; r < mat.rows; r++) {
for (int c = 0; c < mat.columns; c++) {
final v = mat.getF(r, c);
result += v * v;
}
}
return sqrt(result);
}