39 std::array<std::pair<double, double>, 3> m_limits;
41 std::array<std::size_t, 3> m_n_bins;
49 m_n_bins{{
static_cast<std::size_t
>(
n_x_bins),
51 static_cast<std::size_t
>(
n_z_bins)}} {
53 throw std::runtime_error(
"max_x has to be > min_x");
55 throw std::runtime_error(
"max_y has to be > min_y");
57 throw std::runtime_error(
"max_z has to be > min_z");
59 throw std::domain_error(
"n_x_bins has to be >= 1");
61 throw std::domain_error(
"n_y_bins has to be >= 1");
63 throw std::domain_error(
"n_z_bins has to be >= 1");
66 std::vector<std::size_t>
shape()
const override {
67 return {m_n_bins[0], m_n_bins[1], m_n_bins[2]};
70 auto n_bins()
const {
return m_n_bins; }
72 auto limits()
const {
return m_limits; }
75 std::array<std::vector<double>, 3>
edges()
const {
77 {std::vector<double>(m_n_bins[0
u] + 1u),
78 std::vector<double>(m_n_bins[1u] + 1u),
79 std::vector<double>(m_n_bins[2u] + 1u)}};
80 for (
auto i = 0
u; i < 3u; ++i) {
Base class for observables.
Cartesian profile observable.
std::array< std::vector< double >, 3 > edges() const
Calculate the bin edges for each dimension.
std::vector< std::size_t > shape() const override
ProfileObservable(int n_x_bins, int n_y_bins, int n_z_bins, double min_x, double max_x, double min_y, double max_y, double min_z, double max_z)
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
auto make_lin_space(T start, T stop, std::size_t number, bool endpoint=true)
Equally spaced values in interval.