[yoda-svn] r547 - trunk/include/YODA

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Nov 21 09:47:53 GMT 2012


Author: buckley
Date: Wed Nov 21 09:47:53 2012
New Revision: 547

Log:
Doxy/code format tweaks on Axis1D

Modified:
   trunk/include/YODA/Axis1D.h

Modified: trunk/include/YODA/Axis1D.h
==============================================================================
--- trunk/include/YODA/Axis1D.h	Fri Nov 16 22:44:29 2012	(r546)
+++ trunk/include/YODA/Axis1D.h	Wed Nov 21 09:47:53 2012	(r547)
@@ -221,9 +221,13 @@
       eraseBins(from+1, to);
     }
 
-    /// Merge every group of @a n bins, starting from the LHS
+    /// @brief Merge every group of @a n bins, starting from the LHS
+    ///
+    /// If the number of bins is not a multiple of @a n, the last @a m < @a n
+    /// bins on the RHS will also be merged, as the closest possible approach to
+    /// factor @n rebinning everywhere.
     void rebin(size_t n) {
-      for(size_t m=0; m < numBins(); m++) {
+      for (size_t m = 0; m < numBins(); m++) {
         const size_t end = (m + n - 1 < numBins()) ? m + n -1 : numBins() - 1;
         if (end > m) mergeBins(m, end);
       }
@@ -238,7 +242,7 @@
 
 
     /// Add a contiguous set of bins to an axis, via their list of edges
-    void addBins(const std::vector<double> &binedges) {
+    void addBins(const std::vector<double>& binedges) {
       Bins newBins(_bins);
       if (binedges.size() == 0)
         return;


More information about the yoda-svn mailing list