diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-08-12 18:47:51 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-08-12 18:48:05 +0200 |
commit | 3bae8d0bd075693a88563a225e8a2c2f3d248e76 (patch) | |
tree | 2fe70c4afce34d45fa26d74a877214fcaf213924 | |
parent | f98bf923d17a34d7833e9a8fe86b06faaef54bd7 (diff) |
Indicate which intervals are closed and which are open
-rw-r--r-- | histogram.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/histogram.cpp b/histogram.cpp index be6ec41..5bb2133 100644 --- a/histogram.cpp +++ b/histogram.cpp @@ -136,7 +136,7 @@ int main(int argc,char **argv){ int tally=histogram[i]; int width=BARWIDTH*tally/maxtally; cout<<fullbar+BARWIDTH-width<<emptybar+width - <<" ("<<setw(11)<<low+(double)i/nbins*(high-low)<<" - "<<setw(11)<<low+(double)(i+1)/nbins*(high-low)<<")" + <<" ["<<setw(11)<<low+(double)i/nbins*(high-low)<<" - "<<setw(11)<<low+(double)(i+1)/nbins*(high-low)<<")]"[i==(int)histogram.size()-1] <<" ["<<tally<<"]"<<endl; } } |