![]() 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/accumulators/statistics/ |
Upload File : |
/////////////////////////////////////////////////////////////////////////////// // error_of.hpp // // Copyright 2005 Eric Niebler. 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_ACCUMULATORS_STATISTICS_ERROR_OF_HPP_EAN_29_11_2005 #define BOOST_ACCUMULATORS_STATISTICS_ERROR_OF_HPP_EAN_29_11_2005 #include <boost/mpl/placeholders.hpp> #include <boost/accumulators/framework/accumulator_base.hpp> #include <boost/accumulators/framework/extractor.hpp> #include <boost/accumulators/framework/depends_on.hpp> #include <boost/accumulators/statistics_fwd.hpp> namespace boost { namespace accumulators { namespace impl { /// INTERNAL ONLY /// template<typename Feature> struct this_feature_has_no_error_calculation : mpl::false_ { }; /////////////////////////////////////////////////////////////////////////////// // error_of_impl /// INTERNAL ONLY /// template<typename Sample, typename Feature> struct error_of_impl : accumulator_base { // TODO: specialize this on the specific features that have errors we're // interested in. BOOST_MPL_ASSERT((this_feature_has_no_error_calculation<Feature>)); // for boost::result_of typedef int result_type; error_of_impl(dont_care) { } result_type result(dont_care) const { return 0; } }; } // namespace impl /////////////////////////////////////////////////////////////////////////////// // tag::error_of // namespace tag { template<typename Feature> struct error_of : depends_on<Feature> { /// INTERNAL ONLY /// typedef accumulators::impl::error_of_impl<mpl::_1, Feature> impl; }; } /////////////////////////////////////////////////////////////////////////////// // extract::error_of // namespace extract { BOOST_ACCUMULATORS_DEFINE_EXTRACTOR(tag, error_of, (typename)) } using extract::error_of; // make tag::error_of<tag::feature(modifier)> work template<typename Feature> struct as_feature<tag::error_of<Feature> > { typedef tag::error_of<typename as_feature<Feature>::type> type; }; // make error_of<tag::mean> work with non-void weights (should become // error_of<tag::weighted_mean> template<typename Feature> struct as_weighted_feature<tag::error_of<Feature> > { typedef tag::error_of<typename as_weighted_feature<Feature>::type> type; }; }} // namespace boost::accumulators #endif