diff options
Diffstat (limited to 'boost/accumulators/statistics')
5 files changed, 22 insertions, 11 deletions
diff --git a/boost/accumulators/statistics/covariance.hpp b/boost/accumulators/statistics/covariance.hpp index 73c92aebb5..b3030b9676 100644 --- a/boost/accumulators/statistics/covariance.hpp +++ b/boost/accumulators/statistics/covariance.hpp @@ -50,17 +50,9 @@ namespace boost { namespace numeric template<typename Left, typename Right> struct outer_product<Left, Right, std_vector_tag, std_vector_tag> - : std::binary_function< - Left - , Right - , ublas::matrix< - typename functional::multiplies< - typename Left::value_type - , typename Right::value_type - >::result_type - > - > { + typedef Left first_argument_type; + typedef Right second_argument_type; typedef ublas::matrix< typename functional::multiplies< diff --git a/boost/accumulators/statistics/tail.hpp b/boost/accumulators/statistics/tail.hpp index cc9267f9d4..be6cdee392 100644 --- a/boost/accumulators/statistics/tail.hpp +++ b/boost/accumulators/statistics/tail.hpp @@ -248,8 +248,11 @@ namespace impl /////////////////////////////////////////////////////////////////////////////// // struct indirect_cmp - : std::binary_function<std::size_t, std::size_t, bool> { + typedef std::size_t first_argument_type; + typedef std::size_t second_argument_type; + typedef bool result_type; + indirect_cmp(std::vector<Sample> const &s) : samples(s) { diff --git a/boost/accumulators/statistics/tail_variate_means.hpp b/boost/accumulators/statistics/tail_variate_means.hpp index d34d4abcd5..a97eab5648 100644 --- a/boost/accumulators/statistics/tail_variate_means.hpp +++ b/boost/accumulators/statistics/tail_variate_means.hpp @@ -118,7 +118,11 @@ namespace impl this->tail_means_.begin() , this->tail_means_.end() , this->tail_means_.begin() +#ifdef BOOST_NO_CXX98_BINDERS + , std::bind(std::divides<float_type>(), std::placeholders::_1, factor) +#else , std::bind2nd(std::divides<float_type>(), factor) +#endif ); } else diff --git a/boost/accumulators/statistics/times2_iterator.hpp b/boost/accumulators/statistics/times2_iterator.hpp index d46dd042ef..dbd81af7cf 100644 --- a/boost/accumulators/statistics/times2_iterator.hpp +++ b/boost/accumulators/statistics/times2_iterator.hpp @@ -23,7 +23,11 @@ namespace boost { namespace accumulators namespace detail { typedef transform_iterator< +#ifdef BOOST_NO_CXX98_BINDERS + decltype(std::bind(std::multiplies<std::size_t>(), 2, std::placeholders::_1)) +#else std::binder1st<std::multiplies<std::size_t> > +#endif , counting_iterator<std::size_t> > times2_iterator; @@ -31,7 +35,11 @@ namespace detail { return make_transform_iterator( make_counting_iterator(i) +#ifdef BOOST_NO_CXX98_BINDERS + , std::bind(std::multiplies<std::size_t>(), 2, std::placeholders::_1) +#else , std::bind1st(std::multiplies<std::size_t>(), 2) +#endif ); } diff --git a/boost/accumulators/statistics/weighted_tail_variate_means.hpp b/boost/accumulators/statistics/weighted_tail_variate_means.hpp index 2c9078335d..b1133109ed 100644 --- a/boost/accumulators/statistics/weighted_tail_variate_means.hpp +++ b/boost/accumulators/statistics/weighted_tail_variate_means.hpp @@ -169,7 +169,11 @@ namespace impl this->tail_means_.begin() , this->tail_means_.end() , this->tail_means_.begin() +#ifdef BOOST_NO_CXX98_BINDERS + , std::bind(numeric::functional::divides<typename array_type::value_type const, float_type const>(), std::placeholders::_1, factor) +#else , std::bind2nd(numeric::functional::divides<typename array_type::value_type const, float_type const>(), factor) +#endif ); return make_iterator_range(this->tail_means_); |