reduce_command.hpp 959 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2020 Hans Dembinski
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt
  5. // or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. #ifndef BOOST_HISTOGRAM_DETAIL_REDUCE_COMMAND_HPP
  7. #define BOOST_HISTOGRAM_DETAIL_REDUCE_COMMAND_HPP
  8. #include <boost/histogram/fwd.hpp>
  9. namespace boost {
  10. namespace histogram {
  11. namespace detail {
  12. struct reduce_command {
  13. static constexpr unsigned unset = static_cast<unsigned>(-1);
  14. unsigned iaxis;
  15. enum class range_t : char {
  16. none,
  17. indices,
  18. values,
  19. } range = range_t::none;
  20. union {
  21. axis::index_type index;
  22. double value;
  23. } begin, end;
  24. unsigned merge = 0; // default value indicates unset option
  25. bool crop = false;
  26. // for internal use by the reduce algorithm
  27. bool is_ordered = true;
  28. bool use_underflow_bin = true;
  29. bool use_overflow_bin = true;
  30. };
  31. } // namespace detail
  32. } // namespace histogram
  33. } // namespace boost
  34. #endif