mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-12 05:31:51 +00:00
move reduce_command into separate header
This commit is contained in:
parent
82a22250aa
commit
38d9118c29
@ -11,6 +11,7 @@
|
|||||||
#include <boost/histogram/axis/traits.hpp>
|
#include <boost/histogram/axis/traits.hpp>
|
||||||
#include <boost/histogram/detail/axes.hpp>
|
#include <boost/histogram/detail/axes.hpp>
|
||||||
#include <boost/histogram/detail/make_default.hpp>
|
#include <boost/histogram/detail/make_default.hpp>
|
||||||
|
#include <boost/histogram/detail/reduce_command.hpp>
|
||||||
#include <boost/histogram/detail/static_if.hpp>
|
#include <boost/histogram/detail/static_if.hpp>
|
||||||
#include <boost/histogram/fwd.hpp>
|
#include <boost/histogram/fwd.hpp>
|
||||||
#include <boost/histogram/indexed.hpp>
|
#include <boost/histogram/indexed.hpp>
|
||||||
@ -23,32 +24,6 @@
|
|||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace histogram {
|
namespace histogram {
|
||||||
namespace detail {
|
|
||||||
struct reduce_command {
|
|
||||||
static constexpr unsigned unset = static_cast<unsigned>(-1);
|
|
||||||
unsigned iaxis;
|
|
||||||
enum class range_t : char {
|
|
||||||
none,
|
|
||||||
indices,
|
|
||||||
values,
|
|
||||||
} range = range_t::none;
|
|
||||||
union {
|
|
||||||
axis::index_type index;
|
|
||||||
double value;
|
|
||||||
} begin;
|
|
||||||
union {
|
|
||||||
axis::index_type index;
|
|
||||||
double value;
|
|
||||||
} end;
|
|
||||||
unsigned merge = 0; // default value indicates unset option
|
|
||||||
bool crop = false;
|
|
||||||
// for internal use by the reduce algorithm
|
|
||||||
bool is_ordered = true;
|
|
||||||
bool use_underflow_bin = true;
|
|
||||||
bool use_overflow_bin = true;
|
|
||||||
};
|
|
||||||
} // namespace detail
|
|
||||||
|
|
||||||
namespace algorithm {
|
namespace algorithm {
|
||||||
|
|
||||||
/** Holder for a reduce command.
|
/** Holder for a reduce command.
|
||||||
|
40
include/boost/histogram/detail/reduce_command.hpp
Normal file
40
include/boost/histogram/detail/reduce_command.hpp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Copyright 2020 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_DETAIL_REDUCE_COMMAND_HPP
|
||||||
|
#define BOOST_HISTOGRAM_DETAIL_REDUCE_COMMAND_HPP
|
||||||
|
|
||||||
|
#include <boost/histogram/fwd.hpp>
|
||||||
|
|
||||||
|
namespace boost {
|
||||||
|
namespace histogram {
|
||||||
|
namespace detail {
|
||||||
|
|
||||||
|
struct reduce_command {
|
||||||
|
static constexpr unsigned unset = static_cast<unsigned>(-1);
|
||||||
|
unsigned iaxis;
|
||||||
|
enum class range_t : char {
|
||||||
|
none,
|
||||||
|
indices,
|
||||||
|
values,
|
||||||
|
} range = range_t::none;
|
||||||
|
union {
|
||||||
|
axis::index_type index;
|
||||||
|
double value;
|
||||||
|
} begin, end;
|
||||||
|
unsigned merge = 0; // default value indicates unset option
|
||||||
|
bool crop = false;
|
||||||
|
// for internal use by the reduce algorithm
|
||||||
|
bool is_ordered = true;
|
||||||
|
bool use_underflow_bin = true;
|
||||||
|
bool use_overflow_bin = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace detail
|
||||||
|
} // namespace histogram
|
||||||
|
} // namespace boost
|
||||||
|
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user