normalize method

void normalize()

Implementation

void normalize() {
  final total = fold<double>(0, (double v, HistBin<T> e) => v + e.density);
  for (final bin in this) {
    bin.density = bin.density / total;
  }
}