From ea9e1d11b6fda4c42d66ef87b28e84ecb3be40f9 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 3 Feb 2025 09:40:44 -0500 Subject: [PATCH] Remove duplicate iostream operators --- .../random/inverse_gaussian_distribution.hpp | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/include/boost/random/inverse_gaussian_distribution.hpp b/include/boost/random/inverse_gaussian_distribution.hpp index 69b97c8..5ac4eb3 100644 --- a/include/boost/random/inverse_gaussian_distribution.hpp +++ b/include/boost/random/inverse_gaussian_distribution.hpp @@ -1,12 +1,12 @@ /* boost random/inverse_gaussian_distribution.hpp header file - * + * * Copyright Young Geun Kim 2025 * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) - * + * * See http://www.boost.org for most recent version including documentation. - * + * * $Id$ */ @@ -30,12 +30,12 @@ namespace random { /** * The inverse gaussian distribution is a real-valued distribution with * two parameters alpha (mean) and beta (shape). It produced values > 0. - * + * * It has * \f$\displaystyle p(x) = \sqrt{\beta / (2 \pi x^3)} \exp(-\frac{\beta (x - \alpha)^2}{2 \alpha^2 x})$. - * + * * The algorithm used is from - * + * * @blockquote * "Generating Random Variates Using Transformations with Multiple Roots", * Michael, J. R., Schucany, W. R. and Haas, R. W., @@ -77,14 +77,6 @@ public: BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, param_type, parm) { os << parm._alpha << ' ' << parm._beta; return os; } - /** Reads a @c param_type from a @c std::istream. */ - BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, param_type, parm) - { is >> parm._alpha >> std::ws >> parm._beta; return is; } - - /** Writes a @c param_type to a @c std::ostream. */ - BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, param_type, parm) - { os << parm._alpha << ' ' << parm._beta; return os; } - /** Reads a @c param_type from a @c std::istream. */ BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, param_type, parm) { is >> parm._alpha >> std::ws >> parm._beta; return is; } @@ -95,7 +87,7 @@ public: /** Returns true if the two sets fo parameters are different. */ BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(param_type) - + private: RealType _alpha; RealType _beta; @@ -205,7 +197,7 @@ public: */ BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(inverse_gaussian_distribution, lhs, rhs) { return lhs._alpha == rhs._alpha && lhs._beta == rhs._beta; } - + /** * Returns true if the two instances of @c inverse_gaussian_distribution will * return different sequences of values given equal generators. @@ -230,4 +222,4 @@ using random::inverse_gaussian_distribution; } // namespace boost -#endif // BOOST_RANDOM_INVERSE_GAUSSIAN_DISTRIBUTION_HPP \ No newline at end of file +#endif // BOOST_RANDOM_INVERSE_GAUSSIAN_DISTRIBUTION_HPP