Ignore:
Timestamp:
Aug 5, 2005, 4:14:02 PM (17 years ago)
Author:
Peter
Message:

modified function normalize in histogram

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/statistics/Histogram.cc

    r298 r372  
    5555
    5656
    57 void Histogram::normalize(double scale_factor)
     57void Histogram::normalize(bool choice)
    5858{
     59  double scale_factor;
     60  if (choice)
     61    scale_factor = sum_all_.sum_w();
     62  else
     63    scale_factor = sum_all_.sum_w()*spacing();
    5964  for (size_t i=0; i<histogram_.size(); i++)
    6065    histogram_[i]/=scale_factor;
     66
    6167}
    6268
Note: See TracChangeset for help on using the changeset viewer.