![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/include/boost/histogram/accumulators/ |
Upload File : |
// Copyright 2015-2017 Hans Dembinski // // 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) #ifndef BOOST_HISTOGRAM_ACCUMULATORS_OSTREAM_HPP #define BOOST_HISTOGRAM_ACCUMULATORS_OSTREAM_HPP #include <boost/histogram/fwd.hpp> #include <iosfwd> /** \file boost/histogram/accumulators/ostream.hpp Simple streaming operators for the builtin accumulator types. The text representation is not guaranteed to be stable between versions of Boost.Histogram. This header is only included by [boost/histogram/ostream.hpp](histogram/reference.html#header.boost.histogram.ostream_hpp). To you use your own, include your own implementation instead of this header and do not include [boost/histogram/ostream.hpp](histogram/reference.html#header.boost.histogram.ostream_hpp). */ #ifndef BOOST_HISTOGRAM_DOXYGEN_INVOKED namespace boost { namespace histogram { namespace accumulators { template <class CharT, class Traits, class W> std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, const sum<W>& x) { os << "sum(" << x.large() << " + " << x.small() << ")"; return os; } template <class CharT, class Traits, class W> std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, const weighted_sum<W>& x) { os << "weighted_sum(" << x.value() << ", " << x.variance() << ")"; return os; } template <class CharT, class Traits, class W> std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, const mean<W>& x) { os << "mean(" << x.count() << ", " << x.value() << ", " << x.variance() << ")"; return os; } template <class CharT, class Traits, class W> std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, const weighted_mean<W>& x) { os << "weighted_mean(" << x.sum_of_weights() << ", " << x.value() << ", " << x.variance() << ")"; return os; } template <class CharT, class Traits, class T> std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, const thread_safe<T>& x) { os << x.load(); return os; } } // namespace accumulators } // namespace histogram } // namespace boost #endif // BOOST_HISTOGRAM_DOXYGEN_INVOKED #endif