19#ifndef _FUNCTIONUTILS_NDSAMPLERFROMGRID_H
20#define _FUNCTIONUTILS_NDSAMPLERFROMGRID_H
29template <
typename Seq>
34 template <
typename... Axes>
39 template <
typename... Axes>
55template <
typename... Axes>
82template <
typename CellAxis,
typename... GridAxes>
90 pdf_shape.push_back(cell_axis.
size());
96 for (
auto& cell : grid) {
97 assert(cell.size() == cell_axis.
size());
98 for (
auto& cv : cell) {
115template <
typename... GridAxes>
118 auto& cell_ref = *grid.begin();
Provides information related with an axis of a GridContainer.
Representation of a multi-dimensional grid which contains axis information.
T & at(const std::vector< size_t > &coords)
std::unique_ptr< NdSampler< Axes... > > createSamplerFromGrid(const GridContainer::GridContainer< std::vector< double >, Axes... > &grid)
std::vector< std::size_t > unravel_index(std::size_t index, const std::vector< std::size_t > &shape)
std::unique_ptr< T > make_unique(Args &&... args)
Constructs an object of type T and wraps it in a std::unique_ptr using args as the parameter list for...
typename _index_sequence_helper< N >::type _make_index_sequence
_integer_sequence< std::size_t, Idx... > _index_sequence