$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r51950 - in sandbox/SOC/2007/visualization/boost/svg_plot: . detail
From: pbristow_at_[hidden]
Date: 2009-03-24 05:43:23
Author: pbristow
Date: 2009-03-24 05:43:22 EDT (Tue, 24 Mar 2009)
New Revision: 51950
URL: http://svn.boost.org/trac/boost/changeset/51950
Log:
Addition of uncs_of and corrections to values_of.  All projects compile OK.
Text files modified: 
   sandbox/SOC/2007/visualization/boost/svg_plot/detail/auto_axes.hpp       |    10 ++++----                                
   sandbox/SOC/2007/visualization/boost/svg_plot/detail/axis_plot_frame.hpp |    42 --------------------------------------- 
   sandbox/SOC/2007/visualization/boost/svg_plot/uncertain.hpp              |    38 +++++++++++++++++++++++------------     
   3 files changed, 31 insertions(+), 59 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-24 05:43:22 EDT (Tue, 24 Mar 2009)
@@ -35,11 +35,11 @@
  using boost::minmax_element;
  // minmax_element finds both min and max elements more efficiently than separately.
 
-#include <cmath> // for fabs, pow, ceil, log10
-#include <limits> // for std::numeric_limits;
-#include <stdexcept> // for std::domain_error;
-#include <iterator> // for std::iterator_traits;
-#include <utility> // using std::pair;
+#include <cmath> // using std::fabs, std::pow, std::ceil, std::log10
+#include <limits> // using std::numeric_limits;
+#include <stdexcept> // using std::domain_error;
+#include <iterator> // using std::iterator_traits;
+#include <utility> // using std::pair; using std::make_pair;
 
 // Autoscaling algorithm derived from:
 // Michael P.D. Bramley. CUJ July 2000, p 20 - 26.
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-24 05:43:22 EDT (Tue, 24 Mar 2009)
@@ -3657,52 +3657,12 @@
           { // Set to use X min & max pair 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_, autoscale_plusminus_,
+              derived().autoscale_check_limits_, derived().autoscale_plusminus_,
               derived().x_include_zero_, derived().x_tight_, derived().x_min_ticks_, derived().x_steps_);
             derived().x_autoscale_ = true; // Default to use any calculated values?
             return derived();
           } // autoscale(pair<double, double> p)
 
-
-       //  unable to match function definition to an existing declaration definition
-       // 'Derived &boost::svg::detail::axis_plot_frame<Derived>::x_autoscale(const T &,const T &)'
-       // existing declarations
-       // 'Derived &boost::svg::detail::axis_plot_frame<Derived>::x_autoscale(const T &)'
-       // 'Derived &boost::svg::detail::axis_plot_frame<Derived>::x_autoscale(const T &,const T &)'
-       // 'Derived &boost::svg::detail::axis_plot_frame<Derived>::x_autoscale(std::pair<_Ty1,_Ty2>)'
-       // with
-       // [
-       //     _Ty1=double,
-       //     _Ty2=double
-       // ]
-       // 'Derived &boost::svg::detail::axis_plot_frame<Derived>::x_autoscale(bool)'
-       //'bool boost::svg::detail::axis_plot_frame<Derived>::x_autoscale(void)'
-         //
-          //template <class Derived, class T> // T an STL container: array, vector ...
-          //Derived& axis_plot_frame<Derived>::x_autoscale(const T& begin, const T& end)
-          //{ // Data series using iterators to calculate autoscaled values.
-          //    scale_axis(begin, end,
-          //    &derived().x_auto_min_value_, &derived().x_auto_max_value_, &derived().x_auto_tick_interval_, &derived().x_auto_ticks_,
-          //    derived().autoscale_check_limits_,
-          //    derived().x_include_zero_, derived().x_tight_, derived().x_min_ticks_, derived().x_steps_);
-
-          //  derived().x_autoscale_ = true; // Default to use calculated values.
-          //  return derived();
-          //} // x_autoscale(const T& begin, const T& end)
-
-          //template <class Derived, class T> // T an STL container: array, vector ...
-          //Derived& axis_plot_frame<Derived>::x_autoscale(const T& container) // Whole data series.
-          //{ // to use to calculate autoscaled values.
-          //    //scale_axis(container.begin(), container.end(), // All the container.
-          //    scale_axis(container, // All the container.
-          //    &derived().x_auto_min_value_, &derived().x_auto_max_value_, &derived().x_auto_tick_interval_, &derived().x_auto_ticks_,
-          //    derived().autoscale_check_limits_,
-          //    derived().x_include_zero_, derived().x_tight_, derived().x_min_ticks_, derived().x_steps_);
-
-          //  derived().x_autoscale_ = true; // Default to use calculated values.
-          //  return derived();
-          //} // x_autoscale(const T& container)
-
           template <class Derived>
           Derived& axis_plot_frame<Derived>::x_with_zero(bool b)
           { //! Set X-axis autoscale to include zero (default = false).
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-24 05:43:22 EDT (Tue, 24 Mar 2009)
@@ -245,7 +245,7 @@
 // Note names plural valueS_of
 
 template <class T>
-std::pair<double, double> values_of(T);
+std::pair<double, double> values_of(T); // Declaration.
 
 template <class T>
 std::pair<double, double> values_of(std::pair<const T, T> vp)
@@ -254,7 +254,7 @@
 }
 
 template <class T>
-std::pair<double, double> values_of(std::pair<unc, unc> up)
+std::pair<double, double> values_of(std::pair<const unc, unc> up)
 { //! \return value (part) as a pair of doubles.
   // so can write
   // std::pair<const double, double> minmax = value_of(*result.first); // x min & max
@@ -266,16 +266,29 @@
   return minmax;  
 }
 
-//template <class T>
-//std::pair<double, double> values_of(std::pair<T, T> vp)
-//{ //! \return value (part) as a pair of doubles.
-//  // so can write
-//  // std::pair<double, double> minmax = value_of(*result.first); // x min & max
-//  // whether T is double or unc.
-//  std::pair<double, double> minmax = std::make_pair(vp.first.value(), vp.second.value());
-//  return minmax;  
-//}
+template <class T>
+std::pair<double, double> values_of(std::pair<T, T> vp)
+{
+  return std::make_pair(value_of(vp.first), value_of(vp.second));
+}
 
+template <class T>
+std::pair<double, double> values_of(std::pair<unc, unc> up)
+{ //! \return value (part) as a pair of doubles.
+  // so can write
+  // std::pair<const double, double> minmax = value_of(*result.first); // x min & max
+  // whether T is double or unc.
+  return std::make_pair<double, double>(up.first.value(), up.second.value());
+}
+
+template <class T>
+std::pair<float, float> uncs_of(T); // Declaration.
+
+template <class T>
+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>
 std::pair<const float, float> uncs_of(std::pair<const T, T> vp)
@@ -283,8 +296,7 @@
   // so can write
   // std::pair<const float, float> minmax = value_of(*result.first); // min unc & max unc for example/
   // whether T is built-in or unc.
-  std::pair<const double, double> minmax = std::make_pair(vp.first.value(), vp.second.value());
-  return minmax;  
+  return std::make_pair(vp.first.unc(), vp.second.unc());
 }
 
 } // namespace svg