L2 norm ‖v‖.
double vecNorm(Vector v) { var acc = 0.0; for (final x in v.values) { acc += x * x; } return math.sqrt(acc); }