// Copyright 2018 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_MAKE_PROFILE_HPP #define BOOST_HISTOGRAM_MAKE_PROFILE_HPP #include #include #include #include /** \file boost/histogram/make_profile.hpp Collection of factory functions to conveniently create profiles. Profiles are histograms which accept an additional sample and compute the mean of the sample in each cell. */ namespace boost { namespace histogram { /** Make profle from compile-time axis configuration. @param axis First axis instance. @param axes Other axis instances. */ template > auto make_profile(Axis&& axis, Axes&&... axes) { return make_histogram_with(profile_storage(), std::forward(axis), std::forward(axes)...); } /** Make profle from compile-time axis configuration which accepts weights. @param axis First axis instance. @param axes Other axis instances. */ template > auto make_weighted_profile(Axis&& axis, Axes&&... axes) { return make_histogram_with(weighted_profile_storage(), std::forward(axis), std::forward(axes)...); } /** Make profile from iterable range. @param iterable Iterable range of axis objects. */ template > auto make_profile(Iterable&& iterable) { return make_histogram_with(profile_storage(), std::forward(iterable)); } /** Make profile from iterable range which accepts weights. @param iterable Iterable range of axis objects. */ template > auto make_weighted_profile(Iterable&& iterable) { return make_histogram_with(weighted_profile_storage(), std::forward(iterable)); } /** Make profile from iterator interval. @param begin Iterator to range of axis objects. @param end Iterator to range of axis objects. */ template > auto make_profile(Iterator begin, Iterator end) { return make_histogram_with(profile_storage(), begin, end); } /** Make profile from iterator interval which accepts weights. @param begin Iterator to range of axis objects. @param end Iterator to range of axis objects. */ template > auto make_weighted_profile(Iterator begin, Iterator end) { return make_histogram_with(weighted_profile_storage(), begin, end); } } // namespace histogram } // namespace boost #endif