Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80332 - in sandbox/SOC/2007/visualization/boost/svg_plot: detail impl
From: pbristow_at_[hidden]
Date: 2012-08-31 11:01:07


Author: pbristow
Date: 2012-08-31 11:01:06 EDT (Fri, 31 Aug 2012)
New Revision: 80332
URL: http://svn.boost.org/trac/boost/changeset/80332

Log:
Numerous final changes for gcc - run OK with -fpermissive
Text files modified:
   sandbox/SOC/2007/visualization/boost/svg_plot/detail/auto_axes.hpp | 43 +++++++++++++++++++++------------------
   sandbox/SOC/2007/visualization/boost/svg_plot/impl/axis_plot_frame.ipp | 11 ++++++---
   sandbox/SOC/2007/visualization/boost/svg_plot/impl/svg_1d_plot.ipp | 2
   3 files changed, 31 insertions(+), 25 deletions(-)

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/auto_axes.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/auto_axes.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/auto_axes.hpp 2012-08-31 11:01:06 EDT (Fri, 31 Aug 2012)
@@ -148,7 +148,7 @@
     double x = value_of(*pos);
     *max = x;
     *min = x;
- //cout << "Initial min & max " << x << endl;
+ //std::cout << "Initial min & max " << x << std::endl;
     pos++;
     goods++;
     while(pos != end)
@@ -165,17 +165,17 @@
           *min = x;
         }
         goods++;
- //cout << goods << " goods, " << x << endl;
+ //std::cout << goods << " goods, " << x << std::endl;
      } // if finite
       else
       { // If x not finite, then the y value won't be plotted.
- cout << "limit value: " << *pos << endl;
+ std::cout << "limit value: " << *pos << std::endl;
         limits++;
       }
       ++pos;
     } // while
- //cout << "min " << *min << ", max " << *max << endl; //
- //cout << "limits " << limits << endl;
+ //std::cout << "min " << *min << ", max " << *max << std::endl; //
+ //std::cout << "limits " << limits << std::endl;
   }
   if (goods < 2)
   {
@@ -293,7 +293,7 @@
   }
   else
   { // It is necessary to inspect all values individually.
- // cout << container.size() << " values." << endl;
+ // std::cout << container.size() << " values." << std::endl;
     // Work out min and max, ignoring non-finite, +-infinity, max & min, & NaN).
     // If can't find a max and a min, then will throw exception.
     int good = mnmx(container.begin(), container.end(), &x_min, &x_max);
@@ -301,7 +301,7 @@
     {
       throw std::runtime_error("Autoscale could not find useful min & max values to scale the X axis!");
     }
- // cout << "x_min " << x_min << ", x_max " << x_max << endl; //
+ // std::cout << "x_min " << x_min << ", x_max " << x_max << std::endl; //
   }
   scale_axis(x_min, x_max,
     axis_min_value, axis_max_value, axis_tick_increment, auto_ticks, // All 4 updated.
@@ -381,7 +381,10 @@
       }
       pos++;
     }
- cout << "No limits checks: x_min = " << x_min << ", x_max = " << x_max << ", y_min = " << y_min << ", y_max = " << y_max << endl;
+ std::cout << "No limits checks: x_min = " << x_min
+ << ", x_max = " << x_max
+ << ", y_min = " << y_min
+ << ", y_max = " << y_max << std::endl;
   }
   else
   { // Otherwise it is necessary to inspect all values individually.
@@ -402,7 +405,7 @@
     }
     if (pos == container.end())
     { // ALL values are at limit!
- //cout << "all values at limit" << endl;
+ //std::cout << "all values at limit" << std::endl;
       throw std::runtime_error("Autoscale could not find any useful values to scale axes!");
     }
     else
@@ -415,7 +418,7 @@
       double yu = unc_of(pos->second) * autoscale_plusminus;
       y_max = y + yu;
       y_min = y - yu;
- //cout << "Initial min & max " << x << "+-" << xu << " = " << x_min << " to " << x_max << ", " << y << "+-" << yu << "=" <<y_min << " to " << y_max << endl;
+ //std::cout << "Initial min & max " << x << "+-" << xu << " = " << x_min << " to " << x_max << ", " << y << "+-" << yu << "=" <<y_min << " to " << y_max << std::endl;
       pos++;
       goods++;
       while(pos != container.end())
@@ -442,20 +445,20 @@
           {
             y_min = y - yu;
           }
- //cout << "min & max " << x << "+-" << xu << " = " << x_min << " to " << x_max << ", " << y << "+-" << yu << "=" <<y_min << " to " << y_max << endl;
+ //std::cout << "min & max " << x << "+-" << xu << " = " << x_min << " to " << x_max << ", " << y << "+-" << yu << "=" <<y_min << " to " << y_max << std::endl;
           goods++;
- // cout << goods << " goods, " << x << ' ' << y << endl;
+ // std::cout << goods << " goods, " << x << ' ' << y << std::endl;
        } // if finite
         else
         { // If either are not finite, then neither useful for autoscaling.
           // If x not finite, then the y value won't be plotted.
           // If y value not finite, then it will be 'off limits'.
- // cout << "limit value: " << pos->first << ' ' << pos->second << endl;
+ // std::cout << "limit value: " << pos->first << ' ' << pos->second << std::endl;
           limits++;
         }
         ++pos;
       } // while
- cout << "Checked: x_min " << x_min << ", x_max " << x_max << ", y_min " << y_min << ", y_max " << y_max << ", " << goods << " 'good' values, " << limits << " values at limits."<< endl;
+ std::cout << "Checked: x_min " << x_min << ", x_max " << x_max << ", y_min " << y_min << ", y_max " << y_max << ", " << goods << " 'good' values, " << limits << " values at limits."<< std::endl;
     }
   }
   scale_axis(x_min, x_max,
@@ -665,12 +668,12 @@
 template <typename T> // T an STL container: array, vector ...
 size_t show(const T& container)
 { //! Utility functions to display STL containers.
- cout << container.size() << " values in container: ";
+ std::cout << container.size() << " values in container: ";
   for (typename T::const_iterator it = container.begin(); it != container.end(); it++)
   {
- cout << *it << ' ';
+ std::cout << *it << ' ';
   }
- cout << endl;
+ std::cout << std::endl;
   return container.size();
 }// Container Data series to plot.
 
@@ -683,11 +686,11 @@
   while (begin != end)
   {
     count++;
- cout << *begin << ' ';
+ std::cout << *begin << ' ';
     ++begin;
   }
- cout << ": " << count << " values used.";
- cout << endl;
+ std::cout << ": " << count << " values used.";
+ std::cout << std::endl;
   return count;
 }// Container Data series to plot.
 

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/impl/axis_plot_frame.ipp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/impl/axis_plot_frame.ipp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/impl/axis_plot_frame.ipp 2012-08-31 11:01:06 EDT (Fri, 31 Aug 2012)
@@ -45,6 +45,8 @@
             clear_grids();
           }
 
+ std::string sv(double v, const value_style& sty, bool);
+
           template <class Derived>
           void axis_plot_frame<Derived>::clear_background()
           { //! Clear the whole image background layer of the SVG plot.
@@ -1241,7 +1243,8 @@
              Unecessary e, +, \& leading exponent zeros may optionally be stripped,
              and the position and rotation controlled.
              std_dev estimate, typically standard deviation
- (half conventional 95% confidence 'plus or minus') may be optionally be appended.
+ (approximately half conventional 95% confidence "plus or minus")
+ may be optionally be appended.
              Degrees of freedom estimate (number of replicates) may optionally be appended.
              ID or name of point, order in sequence, and datetime may also be added.
              For example: "3.45 +-0.1(10)"\n
@@ -1458,8 +1461,8 @@
 
 
           std::string sv(double v, const value_style& sty, bool precise = false)
- { //! Strip from double value any unecessary e, +, & leading exponent zeros, reducing "1.200000" to "1.2" or "3.4e1"...
- // TODO rename fo strip_value?
+ { //! Strip from double value any unnecessary e, +, & leading exponent zeros, reducing "1.200000" to "1.2" or "3.4e1"...
+ // TODO rename for strip_value?
             std::stringstream label;
             // Precision of std_dev is usually less than precision of value,
             // label.precision((unc) ? ((sty.value_precision_ > 3) ? sty.value_precision_-2 : 1) : sty.value_precision_);
@@ -1468,7 +1471,7 @@
             label.flags(sty.value_ioflags_);
             label << v; // "1.2" or "3.4e+001"...
             return (sty.strip_e0s_) ?
- // Default is to strip unecessary e, +, & leading exponent zeros.
+ // Default is to strip unnecessary e, +, & leading exponent zeros.
               strip_e0s(label.str()) // reduce to "1.2" or "3.4e1"...
               :
               label.str(); // Leave unstripped.

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/impl/svg_1d_plot.ipp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/impl/svg_1d_plot.ipp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/impl/svg_1d_plot.ipp 2012-08-31 11:01:06 EDT (Fri, 31 Aug 2012)
@@ -245,7 +245,7 @@
           // TODO Might separate X and Y colors?
         }
         else
- { // Don't plot anything? Might leave a marker to show an 'off the scale' value?
+ { // Don't plot anything? Might leave a marker to show an "off the scale" value?
         }
       } // if in window
     } // for j


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk