Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51967 - in sandbox/SOC/2007/visualization/boost/svg_plot: . detail
From: pbristow_at_[hidden]
Date: 2009-03-25 08:31:39


Author: pbristow
Date: 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
New Revision: 51967
URL: http://svn.boost.org/trac/boost/changeset/51967

Log:
Many documentation fixes.
Text files modified:
   sandbox/SOC/2007/visualization/boost/svg_plot/detail/auto_axes.hpp | 191 ++++++++++++++++++++++-----------------
   sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp | 16 +-
   sandbox/SOC/2007/visualization/boost/svg_plot/detail/pair.hpp | 8
   sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_boxplot_detail.hpp | 16 +-
   sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp | 12 +-
   sandbox/SOC/2007/visualization/boost/svg_plot/show_1d_settings.hpp | 15 ++-
   sandbox/SOC/2007/visualization/boost/svg_plot/stylesheet.hpp | 7 +
   sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot.hpp | 2
   sandbox/SOC/2007/visualization/boost/svg_plot/svg_color.hpp | 3
   sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp | 48 +++++----
   sandbox/SOC/2007/visualization/boost/svg_plot/uncertain.hpp | 31 +++--
   11 files changed, 196 insertions(+), 153 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 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
@@ -2,12 +2,12 @@
   \file auto_axes.hpp
   \brief Scalable Vector Graphic (SVG) autoscaling of axes.
   \details Inspect container or data values to find minimum and maximum,
- avoiding values that are NaN and/or 'at limit'.
- scale axis using max and min values (calculated or user provided)
- optionally to include the orgin, and to set the ticks.
- Provide fine control over any overlap at the edges of the axes to avoid a tiny
- amount over the limit resulting in an ugly extra major tick.
- Also allow optional forcing of the ticks to be multiples of 1, 2, 5, 10.
+ avoiding values that are NaN and/or 'at limit'.
+ scale axis using max and min values (calculated or user provided)
+ optionally to include the orgin, and to set the ticks.
+ Provide fine control over any overlap at the edges of the axes to avoid a tiny
+ amount over the limit resulting in an ugly extra major tick.
+ Also allow optional forcing of the ticks to be multiples of 1, 2, 5, 10.
   \date 7 Feb 09
   \author Paul A. Bristow
  */
@@ -24,7 +24,7 @@
 
 #if defined (_MSC_VER)
 # pragma warning (push)
-# pragma warning (disable: 4100) // 'check_limits' : unreferenced formal parameter
+# pragma warning (disable: 4100) // 'check_limits' and autoscale_plusminus: unreferenced formal parameters
 #endif
 
 #include <boost\svg_plot\detail\FP_compare.hpp> // is_small & is_close
@@ -90,31 +90,32 @@
 //! Round value down to nearest multiple of 2.
 double rounddown2(double value);
 
-void scale_axis(
- double min_value, double max_value, // Scale axis from Input range min & max.
+//! Scale axis and update min and max axis values, and tick increment and number of ticks.
+void scale_axis(
+ double min_value, double max_value, //! Scale axis from Input range min & max.
    double* axis_min_value, double* axis_max_value, double* axis_tick_increment, int* auto_ticks, // All 4 updated.
- // NO check_limits parameter.
- bool origin, // do not include the origin unless the range min_value <= 0 <= max_value.
- double tight, // tightest - fraction of 'overrun' allowed before another tick used.
- // for visual effect up to about 0.001 might suit a 1000 pixel wide image,
- // allowing values just 1 pixel over the tick to be shown.
- int min_ticks, // Minimum number of major ticks.
- int steps); // Round up and down to 2, 4, 6, 8, 10, or 5, 10 or 2, 5, 10 systems.
+ //! NO check_limits parameter.
+ bool origin, //! Do not include the origin unless the range min_value <= 0 <= max_value.
+ double tight, //! Tightness - fraction of 'overrun' allowed before another tick used.
+ //! for visual effect up to about 0.001 might suit a 1000 pixel wide image,
+ //! allowing values just 1 pixel over the tick to be shown.
+ int min_ticks, //! Minimum number of major ticks.
+ int steps); //! Round up and down to 2, 4, 6, 8, 10, or 5, 10 or 2, 5, 10 systems.
 
 // Definitions.
 
 template <typename iter>
 int mnmx(iter begin, iter end, double* min, double* max)
 { //! \brief Inspect values to find min and max.
- /*! \details Inspect all values between begin and (before) end to work out min and max.
- Similar to boost::minmax_element, but ignoring at 'limit': non-finite, +-infinity, max & min, & NaN).
- If can't find a max and a min, then throw a runtime_error exception.
+ /*! \details Inspect all values between begin and (before) end to work out and update min and max.
+ Similar to boost::minmax_element, but ignoring at 'limit': non-finite, +-infinity, max & min, & NaN).
+ If can't find a max and a min, then throw a runtime_error exception.
     \tparam iter STL container iterator.
     \return number of normal values (not NaN nor infinite).
   */
   *max = std::numeric_limits<double>::quiet_NaN();
   *min = std::numeric_limits<double>::quiet_NaN();
- using boost::svg::detail::is_limit; // either x and/or y not a proper data value.
+ using boost::svg::detail::is_limit; // Either x and/or y not a proper data value.
   int goods = 0; // Count of values within limits.
   int limits = 0;
   iter pos = begin;
@@ -171,40 +172,45 @@
 } // inmmax(iter begin, iter end, double* min, double* max)
 
 //! scale axis function to define axis marker ticks based on min & max parameters values.
-
 void scale_axis(
- double min_value, //! Minimum value.
- double max_value, //! Maximum value.
+ double min_value, //!< Minimum value.
+ double max_value, //!< Maximum value.
    double* axis_min_value, double* axis_max_value, double* axis_tick_increment, int* auto_ticks, //! All 4 updated.
- bool check_limits, //! Whether to check all values for infinity, NaN etc.
- double autoscale_plusminus, // Mutiplier of uncertainty or standard deviations to allow fo confidence ellipses.
- bool origin, //! If true, ensures that zero is a tick value.
- double tight, //! Allows user to avoid a small fraction over a tick using another tick.
- int min_ticks, //! Minimum number of ticks.
- int steps) //! Round up and down to 2, 4, 6, 8, 10, or 5, 10, or 2, 5, 10 major ticks multiples.
+ bool check_limits, //!< Whether to check all values for infinity, NaN etc.
+ double autoscale_plusminus, //!< Multiplier of uncertainty or standard deviations to allow for confidence ellipses.
+ bool origin, //!< If true, ensures that zero is a tick value.
+ double tight, //!< Allows user to avoid a small fraction over a tick using another tick.
+ int min_ticks, //!< Minimum number of ticks.
+ int steps) //!< Round up and down to 2, 4, 6, 8, 10, or 5, 10, or 2, 5, 10 major ticks multiples.
 {
   // Must assume max and min are OK (can't ignore limit values).
   // If either at limit then will be caught and exception thrown later by x_range.
- // So deliberately ignore check_limits parameter & suppress any warning.
+ // So deliberately ignore check_limits parameter & and autoscale_plusminus & suppress any warnings.
   scale_axis(min_value, max_value,
     axis_min_value, axis_max_value, axis_tick_increment, auto_ticks, // All 4 updated.
     origin, tight, min_ticks, steps); // Display range.
 }
 
-template <typename iter> // T an STL container: array, vector, set ...
-void scale_axis( //! Scale axis from data series (usually to plot), perhaps only part of container.
- iter begin, iter end,
+//! Scale axis using an iterator into an STL container.
+template <typename iter> // \tparam iter interator into an STL container: array, vector, set ...
+void scale_axis(
+ iter begin, //!< iterators into begin in STL container.
+ iter end, //!< iterators into end in STL container.
    // (not necessarily ordered, so will find min and max).
- double* axis_min_value, double* axis_max_value, double* axis_tick_increment, int* auto_ticks, // All 4 updated.
- bool check_limits, // Whether to check all values for infinity, NaN etc.
- double autoscale_plusminus, // Mutiplier of uncertainty or standard deviations to allow fo confidence ellipses.
- bool origin = false, // do not include the origin unless the range min_value <= 0 <= max_value.
- double tight = 0., // tightest - fraction of 'overrun' allowed before another tick used.
+ double* axis_min_value, //!< Updated with axis_min_value
+ double* axis_max_value, //!< Updated with axis_max_value
+ double* axis_tick_increment, //!< Updated with axis_tick_increment
+ int* auto_ticks, //!< Updated with number of ticks
+ bool check_limits, //!< Whether to check all values for infinity, NaN etc.
+ double autoscale_plusminus, //!< Mutiplier of uncertainty or standard deviations to allow fo confidence ellipses.
+ bool origin = false, //!< do not include the origin unless the range min_value <= 0 <= max_value.
+ double tight = 0., //!< tightest - fraction of 'overrun' allowed before another tick used.
    // for visual effect up to about 0.001 might suit a 1000 pixel wide image,
    // allowing values just 1 pixel over the tick to be shown.
- int min_ticks = 6, // Minimum number of major ticks.
- int steps = 0) // 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
-{
+ int min_ticks = 6, //!< Minimum number of major ticks.
+ int steps = 0) //!< 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
+{ //! Scale axis from data series (usually to plot), perhaps only part of container.
+ // \tparam iter interator into an STL container: array, vector, set ...
    void scale_axis(double min_value, double max_value, // Input range.
                double* axis_min_value, double* axis_max_value, double* axis_tick_increment, int* auto_ticks, // All 4 updated.
                bool origin, // If true, ensures that zero is a tick value.
@@ -236,21 +242,26 @@
   }
 } // template <typename iter> void scale_axis(iter begin, iter end, ...
 
+//! Scale axis using all the 1D data in an STL container.
+//! \tparam T type of STL container, vector, map ...
 template <class T>
-void scale_axis( //! scale axis using an Entire Container Data series, usually to plot.
-//! \tparam T an STL container: array, vector ...
- const T& container,
- // (not necessarily ordered, so will find min and max).
- double* axis_min_value, double* axis_max_value, double* axis_tick_increment, int* auto_ticks, // All 4 updated.
- bool check_limits, // Whether to check all values for infinity, NaN etc.
- double autoscale_plusminus = 3., // Mutiplier of uncertainty or standard deviations to allow fo confidence ellipses.
- bool origin = false, // do not include the origin unless the range min_value <= 0 <= max_value.
- double tight = 0., // tightest - fraction of 'overrun' allowed before another tick used.
- // for visual effect up to about 0.001 might suit a 1000 pixel wide image,
- // allowing values just 1 pixel over the tick to be shown.
- int min_ticks = 6, // Minimum number of major ticks.
- int steps = 0) // 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
-{
+void scale_axis(
+ const T& container, //!< STL container
+ double* axis_min_value, //!< Updated with minimum value for the axis.
+ double* axis_max_value, //!< Updated with maximum value for the axis.
+ double* axis_tick_increment,//!< Updated with
+ int* auto_ticks, //!< Updated with
+ bool check_limits, //!< Whether to check all values for infinity, NaN etc.
+ double autoscale_plusminus = 3., //!< Multiplier of uncertainty or standard deviations to allow fo confidence ellipses.
+ bool origin = false, //!< do not include the origin unless the range min_value <= 0 <= max_value.
+ double tight = 0., //!< tightest - fraction of 'overrun' allowed before another tick used.
+ //! for visual effect up to about 0.001 might suit a 1000 pixel wide image,
+ //! allowing values just 1 pixel over the tick to be shown.
+ int min_ticks = 6, //!< Minimum number of major ticks.
+ int steps = 0) //!< 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
+{ //! scale axis using an Entire Container Data series, usually to plot.
+ //! (not necessarily ordered, so will find min and max).
+ //! \tparam T an STL container: array, vector ...
   double x_min;
   double x_max;
   if (!check_limits)
@@ -280,29 +291,36 @@
     origin, tight, min_ticks, steps); // Display range.
 } // template <class T> int scale_axis T an STL container: array, vector ...
 
-template <class T>
-void scale_axis( //! Scale X and Y axis using T a 2D STL container: array, vector, list ...
- const T& container, //! Container Data series to plot - entire 2D container.
- //! (not necessarily ordered, so will find min and max).
- //! \tparam T STL container of pairs of X and Y.
- double* x_axis_min_value, double* x_axis_max_value, double* x_axis_tick_increment, int* x_auto_ticks,
- double* y_axis_min_value, double* y_axis_max_value, double* y_axis_tick_increment, int* y_auto_ticks,
- // All 8 updated.
- bool check_limits = true, // Whether to check all values for infinity, NaN etc.
- double autoscale_plusminus = 3., // Mutiplier of uncertainty or standard deviations to allow fo confidence ellipses.
- bool x_origin = false, // do not include the origin unless the range min_value <= 0 <= max_value.
- double x_tight = 0., // tightest - fraction of 'overrun' allowed before another tick used.
+ //! Scale X and Y axis using T a 2D STL container: array of pairs, vector of pairs, ...
+template <class T> //!< \tparam T STL container of 2D pairs of X and Y.
+void scale_axis(
+ const T& container, //!< Data series to plot - entire 2D container (not necessarily ordered, so will find min and max).
+ double* x_axis_min_value, //!< Updated with x_axis_min_value.
+ double* x_axis_max_value, //!< Updated with x_axis_max_value.
+ double* x_axis_tick_increment, //!< Updated with X axis tick increment.
+ int* x_auto_ticks, //!< Updated with x_auto_ticks.
+ double* y_axis_min_value, //!< Updated with y_axis_min_value.
+ double* y_axis_max_value, //!< Updated with y_axis_max_value.
+ double* y_axis_tick_increment, //!< Updated with Y axis tick increment.
+ int* y_auto_ticks, //!< Updated with number of Y axis ticks.
+ bool check_limits = true, //!< Whether to check all values for infinity, NaN etc.
+ double autoscale_plusminus = 3., //!< Mutiplier of uncertainty or standard deviations to allow fo confidence ellipses.
+ bool x_origin = false, //!< do not include the origin unless the range min_value <= 0 <= max_value.
+ double x_tight = 0., //!< tightest - fraction of 'overrun' allowed before another tick used.
+ //! for visual effect up to about 0.001 might suit a 1000 pixel wide image,
+ //! allowing values just 1 pixel over the tick to be shown.
+ int x_min_ticks = 6, //!< Minimum number of major ticks.
+ int x_steps = 0, //!< 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
+ bool y_origin = false, //!< do not include the origin unless the range min_value <= 0 <= max_value.
+ double y_tight = 0., //!< tightest - fraction of 'overrun' allowed before another tick used.
   // for visual effect up to about 0.001 might suit a 1000 pixel wide image,
   // allowing values just 1 pixel over the tick to be shown.
- int x_min_ticks = 6, // Minimum number of major ticks.
- int x_steps = 0, // 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
- bool y_origin = false, // do not include the origin unless the range min_value <= 0 <= max_value.
- double y_tight = 0., // tightest - fraction of 'overrun' allowed before another tick used.
- // for visual effect up to about 0.001 might suit a 1000 pixel wide image,
- // allowing values just 1 pixel over the tick to be shown.
- int y_min_ticks = 6, // Minimum number of major ticks.
- int y_steps = 0) // 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
-{
+ int y_min_ticks = 6, //!< Minimum number of major ticks.
+ int y_steps = 0) //!< 0, or 2 for 2, 4, 6, 8, 10, 5 for 1, 5, 10, or 10 (2, 5, 10).
+{ /*! Scale X and Y axis using T a 2D STL container: array, vector, list, map ...
+ \param container Data series to plot - entire 2D container.
+ \tparam T a 2D STL container.
+ */
   double x_max = std::numeric_limits<double>::quiet_NaN();
   double x_min = std::numeric_limits<double>::quiet_NaN();
   double y_max = std::numeric_limits<double>::quiet_NaN();
@@ -629,7 +647,7 @@
 
 template <typename T> // T an STL container: array, vector ...
 size_t show(const T& container)
-{
+{ //! Utility functios to display STL containers.
   cout << container.size() << " values in container: ";
   for (T::const_iterator it = container.begin(); it != container.end(); it++)
   {
@@ -643,7 +661,7 @@
 
 template <typename iter> // T an STL container: array, vector ...
 size_t show(iter begin, iter end) // Iterators
-{
+{ //! Utility function to display STL containers.
   size_t count = 0;
   while (begin != end)
   {
@@ -656,9 +674,10 @@
   return count;
 }// Container Data series to plot.
 
-template <typename T> // T an STL container: container of containers.
+template <typename T>
 size_t show_all(const T& containers)
-{ // Show all the containers values.
+{ //! Show all the containers values.
+ // \tparam T an STL container: container of containers.
   for (T::const_iterator it = containers.begin(); it != containers.end(); it++)
   {
     show(*it);
@@ -666,9 +685,11 @@
   return containers.size();
 } // Container Data series to plot.
 
-template <class T> // T an STL container: array, vector ...
-std::pair<double, double> range(const T& container) // Container Data series
-{
+template <class T>
+std::pair<double, double> range(const T& container) //! Container Data series
+{ /*! \return minimum and maximum of an STL container.
+ \tparam T an STL container: array, vector, set, map ...
+ */
   pair<T::const_iterator, T::const_iterator> result = boost::minmax_element(container.begin(), container.end());
   pair<double, double> minmax;
   minmax.first = *result.first;
@@ -678,7 +699,9 @@
 
 template <class T> // T an STL container: array, vector, set, map ...
 std::pair<double, double> range_all(const T& containers) // Container of STL containers of Data series.
-{
+{ /*! \return minimum and maximum of a container containing STL containers.
+ \tparam T an STL container: array, vector, set, map ...
+ */
   std::pair<double, double> minmax((numeric_limits<double>::max)(), (numeric_limits<double>::min)());
   for (T::const_iterator it = containers.begin(); it != containers.end(); it++)
   {

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
@@ -1219,15 +1219,13 @@
           void draw_plot_point_values(double x, double y, g_element& x_g_ptr, g_element& y_g_ptr, const value_style& x_sty, const value_style& y_sty, unc uncx, unc uncy)
           { /*! \brief Write the \b pair of data point's X and Y values as a string.
                \details If a separator, then both on the same line, for example "1.23, 3.45", or "[5.6, 7.8]
- \verbatim
                  X value_style is used to provide the prefix and separator, and Y value_style to provide the suffix.
- For example, x_style prefix("[ X=", and separator ",<ampersand>#x00A0;Y= ", " and Y value_style = "]"
+ For example, x_style prefix("[ X=", and separator ",\<ampersand\>\#x00A0;Y= ", " and Y value_style = "]"
                  will produce a value label like "[X=-1.23, Y=4.56]"
- Note the need to use a Unicode space <ampsand>#x00A0; for get space for all browsers.
+ Note the need to use a Unicode space \<ampersand\>\#x00A0; for get space for all browsers.
                  For as long a string as this you may need to make the total image size bigger,
                  and to orient the value labels with care.
                  draw_plot_point_values is only when both x and Y pairs are wanted.
- \endverbatim
            */
             // verbatim needed to avoid a warning about using \&#x00A0; within Doxygen comment.
             using std::string;
@@ -1773,9 +1771,9 @@
           Derived& x_autoscale(bool b);
           bool autoscale();
           Derived& autoscale(bool b);
- Derived& x_autoscale(std::pair<double, double> p);
+ Derived& x_autoscale(std::pair<double, double> p); //! autoscale X axis using a pair of doubles.
           template <class T> // T an STL container: array, vector ...
- Derived& x_autoscale(const T& container); // Whole data series.
+ Derived& x_autoscale(const T& container); //! autoscale X axis using the whole data series.
           template <class T> // T an STL container: array, vector ...
           Derived& x_autoscale(const T& begin, const T& end); // Data series using iterators.
           Derived& x_with_zero(bool b);
@@ -2931,8 +2929,8 @@
 
           template <class Derived>
           bool axis_plot_frame<Derived>::legend_box_fill_on()
- {
- return derived().legend_box_.fill_on();
+ { //! \return true if legend box has a background fill color.
+ return derived().legend_box_.fill_on();
           }
 
           template <class Derived>
@@ -3654,7 +3652,7 @@
 
           template <class Derived>
           Derived& axis_plot_frame<Derived>::x_autoscale(std::pair<double, double> p)
- { // Set to use X min & max pair values to autoscale X-axis.
+ { //! Set to use X min & max pair of double values to autoscale X-axis.
             scale_axis(p.first, p.second, // double min and max from pair.
               &derived().x_auto_min_value_, &derived().x_auto_max_value_, &derived().x_auto_tick_interval_, &derived().x_auto_ticks_,
               derived().autoscale_check_limits_, derived().autoscale_plusminus_,

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/pair.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/pair.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/pair.hpp 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
@@ -35,20 +35,20 @@
 
   // Hidden in namespace detail to avoid clashes with other implementations of std::pair operator<<.
   template<class T1, class T2>
- std::ostream& operator<< (std::ostream& os, const std::pair<T1, T2>& p);
- std::ostream& operator<< (std::ostream& os, const std::pair<double, double>& p);
+ std::ostream& operator<< (std::ostream& os, const std::pair<T1, T2>& p); //! Output pair of type T1 and T2 to ostream.
+ std::ostream& operator<< (std::ostream& os, const std::pair<double, double>& p); //! Output pair of doubles to ostream.
  // std::ostream& operator<< (std::ostream& os, const std::pair<boost::svg::unc, boost::svg::unc>& p);
 
   template<class T1, class T2>
   std::ostream& operator<< (std::ostream& os, const std::pair<T1, T2>& p)
- { // Output a pair of values.
+ { //! Output pair of type T1 and T2 to ostream.
          os << p.first << ", " << p.second;
       // Outputs: 1.2, 3.4
       return os;
   } // std::ostream& operator<<
 
   std::ostream& operator<< (std::ostream& os, const std::pair<double, double>& p)
- { // Output a pair of double values.
+ { //! Output a pair of double values to ostream.
       //int precision = os.precision(5); // Save & use rather than default precision(6).
       os << p.first << ", " << p.second;
       // Outputs: 1.2, 3.4

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_boxplot_detail.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_boxplot_detail.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_boxplot_detail.hpp 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
@@ -8,11 +8,12 @@
    void set_ids() copies all strings to matching image.get_g_element(i).id()
    So add any new id items to both!
 
- \author Jacob Voytko and Paul A. Bristow
- */
+ \author Jacob Voytko and Paul A. Bristow
+ \date Mar 2009
+*/
 
 // Copyright Jacob Voytko 2007
-// Copyright Paul A. Bristow 2008
+// Copyright Paul A. Bristow 2008, 2009
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -52,10 +53,11 @@
     BOXPLOT_DOC_CHILDREN
   };
 
+ //! String descriptors used in SVG XML (matching enum boxplot_doc_structure).
   std::string document_ids_[] =
- { //! String descriptors used in SVG XML (matching enum boxplot_doc_structure).
- "imageBackground", // the whole svg image.
- "plotBackground", // the smaller plot window (if used).
+ {
+ "imageBackground", //< the whole svg image.
+ "plotBackground", //< the smaller plot window (if used).
       "X-axis", "Y-axis",
       "xMajorTicks", // Probably not used for Boxplots.
       "yMajorTicks", "yMinorTicks",
@@ -68,7 +70,7 @@
       "title", // of the whole plot.
       "plotNotes", // Free text and shapes to annotate diagram.
       "boxplotDocChildren" // This last string is not used.
- }; // std::string document_ids_
+ }; // std::string document_ids_
 
 } // namespace boxplot
 } // namespace svg

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/detail/svg_tag.hpp 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
@@ -5,6 +5,7 @@
       svg_tag.hpp defines all classes that can occur in the SVG parse tree.
 
    \author Jacob Voytko and Paul A. Bristow
+ \date Mar 2009
 */
 
 // Copyright Jacob Voytko 2007, 2008
@@ -393,12 +394,12 @@
   }; // class rect_element
 
   bool operator==(const rect_element& lhs, const rect_element& rhs)
- { //
+ { //! Compare equality of two SVG rect_elements.
     return (lhs.x() == rhs.x()) && (lhs.y() == rhs.y()) && (lhs.width() == rhs.width()) && (lhs.height() == rhs.height());
   }
 
   bool operator!=(const rect_element& lhs, const rect_element& rhs)
- { //
+ { //! Compare inequality of two SVG rect_elements.
     return (lhs.x() != rhs.x()) || (lhs.y() == rhs.y()) || (lhs.width() == rhs.width()) || (lhs.height() == rhs.height());
   }
 
@@ -511,7 +512,7 @@
   }; // class ellipse_element
 
   enum align_style
- { //! text_element Represents a single block of text, with font & alignment.
+ { //! \enum align_style Represents a single block of text, with font & alignment.
     left_align, //!< Align text to left.
     right_align, //!< Align text to right.
     center_align //!< Center text.
@@ -1168,7 +1169,7 @@
       \details Paths represent the outline of a shape which can be
       filled, stroked, used as a clipping path, or any combination of the three.
      */
- bool relative; // or if false then absolute.
+ bool relative; //!< If true relative else absolute.
 
     virtual void write(std::ostream& rhs) = 0;
     virtual ~path_point()
@@ -1439,7 +1440,7 @@
     bool sweep; //!< true if to draw in positive-angle direction
 
     void write(std::ostream& o_str)
- {
+ { //! Write elliptical arc path XML to ostream.
       if(relative)
       {
         o_str << "a";
@@ -1453,6 +1454,7 @@
         << x << "," << y << " ";
     }
 
+ //! Construct elliptic arc path.
     a_path(double x, double y, double rx, double ry, double x_axis_rotation, bool large_arc = false, bool sweep = false, bool relative = false)
       : x(x), y(y), rx(rx), ry(ry), x_axis_rotation(x_axis_rotation), large_arc(large_arc), sweep(sweep), path_point(relative)
     { // Constructor

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/show_1d_settings.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/show_1d_settings.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/show_1d_settings.hpp 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
@@ -6,11 +6,13 @@
   This is useful for diagnosing why your plot doesn't look as you hoped!
   \warning This creates about 100 lines of output, so should be used sparingly!
 
- (See also show_2d_settings.cpp for 2-D plot).
+ \author Paul A. Bristow
+ \date Mar 2009
+ \see show_2d_settings.cpp for 2-D plot.
  */
 
 // Copyright Jacob Voytko 2007
-// Copyright Paul A. Bristow 2008
+// Copyright Paul A. Bristow 2008, 2009
 
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0.
@@ -33,8 +35,9 @@
   // Declaration, defined below.
   void show_1d_plot_settings(svg_1d_plot& plot);
 
+//! Strings describing each bit in std::ios_base::fmtflags.
 const char* fmtFlagWords[16] =
-{ //! Strings describing each bit in std::ios_base::fmtflags.
+{
   "skipws", "unitbuf", "uppercase","showbase","showpoint","showpos","left","right",
     "internal","dec","oct","hex","scientific","fixed","boolalpha", "?"
     /*
@@ -140,13 +143,15 @@
 // // but OK for this purpose.
 //} // namespace detail
 
+//! Outputs strings to show horizontal orientation: left, right or none.
 const std::string l_or_r(int i)
-{ //! Outputs strings to show horizontal orientation: left, right or none.
+{
  return ((i < 0) ? "left" : ((i == 0) ? "none" : "right"));
 }
 
+//! Outputs strings to show vertical orientation: top, bottom, or none.
 const std::string t_or_b(int i)
-{//! Outputs strings to show vertical orientation: top, bottom, or none.
+{
  return ((i < 0) ? "bottom" : ((i == 0) ? "none" : "top"));
 }
 

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/stylesheet.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/stylesheet.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/stylesheet.hpp 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
@@ -1,9 +1,10 @@
 /*! \file stylesheet.hpp
- \author Jacob Voytko
 
     \brief Implement Cascading Style Sheets for SVG plots (but NOT IMPLEMENTED yet).
     \details
      Get some inscrutable errors from this and so commented out of other modules.
+ \author Jacob Voytko
+ \date 2007
 */
 
 // Copyright Jacob Voytko 2007
@@ -92,8 +93,9 @@
     };
 }; // struct css_parse
 
+//! Validate a style sheet from istream.
 bool validate_stylesheet(std::ifstream& file)
-{ // stream version used by file version below.
+{ //! stream version used by file version below.
     css_parse my_css_parser;
     std::string str;
     std::string tmp;
@@ -115,6 +117,7 @@
     return true;
 } // bool validate_stylesheet(std::ifstream& file)
 
+//! Validate a style sheet from file.
 bool validate_stylesheet(const std::string& file)
 {
     std::ifstream f_str(file.c_str());

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_1d_plot.hpp 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
@@ -331,7 +331,7 @@
   bool plot_window_on_; //!< Use a separate plot window (not whole image).
   bool x_ticks_on_; // TODO check these are really useful.
   bool x_values_on_; //!< values of data are shown by markers.
- int x_axis_position_; //!< enum #x_axis_intersect
+ int x_axis_position_; //!< \see #x_axis_intersect
   bool autoscale_check_limits_; //!< If true, then check autoscale values for infinity, NaN, max, min.
   bool x_autoscale_; //!< If true, use any autoscale values for scaling the X axis.
   double autoscale_plusminus_; //!< For uncertain values, allow for plusminus ellipses showing 67%, 95% and 99% confidence limits.\n

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_color.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_color.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_color.hpp 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
@@ -244,8 +244,9 @@
     return os;
   } // std::ostream& operator<<
 
+ //! SVG standard colors, \see svg_color_constant
   svg_color color_array[] =
- { //! SVG standard colors, see also enum #svg_color_constant
+ {
     svg_color(240, 248, 255), // aliceblue
     svg_color(250, 235, 215), // antiquewhite
     svg_color(0 , 255, 255), // aqua

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/svg_style.hpp 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
@@ -102,7 +102,8 @@
 
 class svg_style
 { //! \class boost::svg::svg_style Holds the basic SVG stroke, fill colors and width, and their switches.
- friend std::ostream& operator<< (std::ostream&, svg_style&);
+ friend std::ostream& operator<< (std::ostream&, const svg_style&);
+ //std::ostream& operator<< (std::ostream& os, const svg_style& s)
 
 private: // Accesses only by set and get member functions below.
   // Private data member variables names end with _,
@@ -253,7 +254,7 @@
        || (s.width_on() != width_on_);
    }
 
- std::ostream& operator<< (std::ostream& os, svg_style& s)
+ std::ostream& operator<< (std::ostream& os, const svg_style& s)
   { /*! Output a string description of a svg_style.
          Usage: svg_style my_svg_style; cout << my_svg_style << endl;
          Outputs: svg_style(RGB(0,0,0), RGB(0,0,0), 0, no fill, no stroke, no width)
@@ -472,7 +473,7 @@
   } // operator==
 
   bool text_style::operator!=(const text_style& ts)
- {//! Compare text_style for inequality (needed for testing).
+ { //! Compare text_style for inequality (needed for testing).
    return (ts.font_size_ != font_size_)
      || (ts.font_family_ != font_family_)
      || (ts.stretch_ != stretch_)
@@ -482,7 +483,9 @@
   } // operator!=
 
   bool operator==(const text_style& lhs, const text_style& rhs)
- { // Note operator== and operator << both needed to use Boost.text.
+ { //! Compare two text_style for equality
+ //! Note operator== and operator << both needed to use Boost.text.
+ //! (But can be avoided with a macro define).
      return (lhs.font_size_ == rhs.font_size_)
        && (lhs.font_family() == rhs.font_family())
        && (lhs.stretch_ == rhs.stretch_)
@@ -492,8 +495,9 @@
   } // bool operator==(const text_style& lhs, const text_style& rhs)
 
   bool operator!= (const text_style& lhs, const text_style& rhs)
- { // Note operator== and operator << both needed to use Boost.Test.
- // But can be avoided with a macro .
+ { //! Compare two text_style for equality.
+ //! Note operator== and operator << both needed to use Boost.Test.
+ //! (But can be avoided with a macro define).
       return (lhs.font_size_ != rhs.font_size_)
        && (lhs.font_family() != rhs.font_family())
        && (lhs.stretch_ != rhs.stretch_)
@@ -798,7 +802,8 @@
 return os;
 } // std::ostream& operator<<
 
-plot_point_style default_plot_point_style(); // Uses all the defaults.
+//! plot_point_style that uses all the defaults.
+plot_point_style default_plot_point_style();
 
 class plot_line_style
 { //! \class boost::svg::plot_line_style Style of line joining data series values.
@@ -938,7 +943,7 @@
   bool axis_line_on_; //!< Draw an X horizontal or Y vertical axis line.
   double axis_; //!< Depending on value of dim, either X-axis (y = 0) transformed into SVG Y coordinates or Y-axis (x = 0) transformed into SVG X coordinates (-1 if not calculated yet).
   // Used in axis_plot_frame.hpp
- axis_line_style( // class axis_line_style default constructor, sets all member data items.
+ axis_line_style( //!< class axis_line_style default constructor, sets all member data items.
     dim d = X,
     double min = -10.,
     double max = +10., // Defaults.
@@ -1294,12 +1299,13 @@
     bool border_on_; //!< Display the border of the box.
     bool fill_on_; //!< Color fill the box.
 
- box_style(const svg_color& scolor = black,
- const svg_color& fcolor = white, // No fill.
- double width = 1, // of border
- double margin = 4., //
- bool border_on = true, // Draw a border of width.
- bool fill_on = false); // Apply fill color.
+ box_style( //! Constructor provides defaults for all member variables.
+ const svg_color& scolor = black, //!< stroke color
+ const svg_color& fcolor = white, //!< fill color (white = no fill).
+ double width = 1, //!< of border.
+ double margin = 4., //!< Margin around box (SVG units, default pixels).
+ bool border_on = true, //!< Draw a border of specified width.
+ bool fill_on = false); //!< Apply fill color.
 
   box_style& stroke(const svg_color& color);
   svg_color stroke();
@@ -1406,7 +1412,7 @@
 // End class box_style Definitions.
 
 enum bar_option
-{ //! \enum bar_option
+{ //! \enum bar_option Options for bar to draw bar charts.
   y_block = -2, //!< Rectangular (optionally filled) block style horizontal to Y-axis,
   y_stick = -1, //!< Bar or row line (stroke width) horizontal to Y-axis.
   no_bar = 0, //!< No bar.
@@ -1417,7 +1423,7 @@
 };
 
 enum histogram_option
-{ //! \enum histogram_option
+{ //! \enum histogram_option options for histograms.
   // row = -1, // Row line (stroke width) horizontal to Y-axis. Not implemented.
   // See svg_2d_plot for details of why not.
   no_histogram = 0, //!< No histogram.
@@ -1472,10 +1478,9 @@
   svg_color color_; //!< Color of line (stroke) (no fill color for lines).
   svg_color area_fill_; //!< Fill color from line to axis.
   double width_; //!< Width of bar, not enclosing line width.
- bar_option bar_option_; // stick or bar.
-
- bar_style(const svg_color& col = black, const svg_color& acol = true, double width = 2, bar_option opt = no_bar);
- bar_style& width(double w);
+ bar_option bar_option_; //!< stick or bar.
+ bar_style(const svg_color& col = black, const svg_color& acol = true, double width = 2, bar_option opt = no_bar); //!< Construct with defaults for all member variables.
+ bar_style& width(double w); //!<
   double width();
   bar_style& color(const svg_color& f);
   svg_color& color();
@@ -1488,8 +1493,7 @@
 
 // class bar_style Definitions.
 
-// Constructor.
-
+//! Constructor, setting defaults for all member variables.
 bar_style::bar_style(const svg_color& col, const svg_color& acol, double width, bar_option opt)
 :
 color_(col), area_fill_(acol), width_(width), bar_option_(opt)

Modified: sandbox/SOC/2007/visualization/boost/svg_plot/uncertain.hpp
==============================================================================
--- sandbox/SOC/2007/visualization/boost/svg_plot/uncertain.hpp (original)
+++ sandbox/SOC/2007/visualization/boost/svg_plot/uncertain.hpp 2009-03-25 08:31:36 EDT (Wed, 25 Mar 2009)
@@ -36,12 +36,14 @@
 {
 namespace svg
 {
- static const double plusminus = 2.; //! Number of standard deviations used for plusminus text display. Nominal factor of 2 (strictly 1.96) corresponds to 95% confidence limit.\n
+ //! Nominal factor of 2 (strictly 1.96) corresponds to 95% confidence limit.
+ static const double plusminus = 2.; //!< Number of standard deviations used for plusminus text display.\n
 
 // template <bool correlated = false>
 class unc
 { /*! \brief Class for storing an observed or measured value together with information
- about its uncertainty (previously called 'error' or 'plusminus').
+ about its uncertainty (previously called 'error' or 'plusminus') represented
+ nominally one standard deviation (but displayed as a multiple, usually two standard deviations).
     \details This version assumes uncorrelated uncertainties (by far the most common case).
     \see http://www.measurementuncertainty.org/ \n
     International Vocabulary of Basic and General Terms in Metrology; ISO/TAG 4 1994\n
@@ -141,7 +143,7 @@
 }
 
 short unsigned unc::types() const
-{ //! \return Other information about the uncertaint value.
+{ //! \return Other information about the uncertain value.
   return types_;
 }
 
@@ -165,9 +167,9 @@
 }
 
 std::ostream& operator<< (std::ostream& os, const unc& u)
-{ /*! Output an value with (if defined) uncertainty and degrees of freedom (and type).
+{ /*! \brief Output an value with (if defined) uncertainty and degrees of freedom (and type).
      For example: "1.23 +/- 0.01 (13)".\n
- Note that the uncertainty is input and stored as one standard deviation,
+ /details Note that the uncertainty is input and stored as one standard deviation,
      but output multiplied for a user configurable 'confidence factor' plusminus,
      default two for about 95% confidence (but could also be one for 67% or 3 for 99% confidence).
   */
@@ -244,16 +246,16 @@
 // Two helper functions to provide values and uncertainties as pairs.
 // Note names plural valueS_of
 
-template <class T>
-std::pair<double, double> values_of(T); // Declaration.
+template <class T> //! \tparam T Builtin-floating point type or unc.
+std::pair<double, double> values_of(T); //!< Get values of a pair of values.
 
-template <class T>
+template <class T> //! \tparam T Builtin-floating point type or unc.
 std::pair<double, double> values_of(std::pair<const T, T> vp)
-{
+{ //!< \return values of a pair of double values.
   return std::make_pair(value_of(vp.first), value_of(vp.second));
 }
 
-template <class T>
+template <class T> //! \tparam T Builtin-floating point type or unc.
 std::pair<double, double> values_of(std::pair<const unc, unc> up)
 { //! \return value (part) as a pair of doubles.
   // so can write
@@ -281,16 +283,19 @@
   return std::make_pair<double, double>(up.first.value(), up.second.value());
 }
 
-template <class T>
+//! Get uncertainties (standard deviation) of a pair of values.
+template <class T> //! \tparam T Builtin-floating point type or unc.
 std::pair<float, float> uncs_of(T); // Declaration.
 
-template <class T>
+//! Get uncertainties (standard deviation) of a pair of values.
+template <class T> //! \tparam T Builtin-floating point type or unc.
 std::pair<float, float> uncs_of(std::pair<T, T> vp)
 {
   return std::make_pair<float, float>(unc_of(vp.first), unc_of(vp.second));
 }
 
-template <class T>
+//! Get uncertainties (standard deviation) of a pair of values.
+template <class T> //! \tparam T Builtin-floating point type or unc.
 std::pair<const float, float> uncs_of(std::pair<const T, T> vp)
 { //! \return uncertainty parts (if any) as a pair of floats.
   // so can write


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