FillableStorage.h
Go to the documentation of this file.
20 template <size_t FillDim, template<size_t, typename, typename> class BinT, typename BinningT, size_t N>
45 template <size_t DbnN, template<size_t, typename, typename> class BinT, typename BinningT, size_t N>
47 static_assert(DbnN >= N, "Dimension of the Dbn needs to be at least as high as binning dimension!");
55 using AdapterT = std::function<void(BinT<N, Dbn<DbnN>, BinningT>&, FillCoords&&, double, double)>;
133 FillableStorage(const std::vector<AxisT>&... edges, FillAdapterT adapter = AdapterWrapperT()._adapter)
137 FillableStorage(std::vector<AxisT>&&... edges, FillAdapterT adapter = AdapterWrapperT()._adapter)
138 : BaseT(std::move(edges)...), _fillAdapter(adapter), _nancount(0), _nansumw(0.), _nansumw2(0.) { }
146 : BaseT(std::move(axes)...), _fillAdapter(adapter), _nancount(0), _nansumw(0.), _nansumw2(0.) { }
188 int fill(FillCoordsT&& coords, const double weight = 1.0, const double fraction = 1.0) noexcept {
BinnedStorage, stores the bins and coordinates access to them. Definition BinnedStorage.h:114 Binning< std::decay_t< decltype(std::declval< Axis< AxisT > >())>... > BinningT Convenience alias to be used in constructor. Definition BinnedStorage.h:118 BinnedStorage & operator=(const BinnedStorage &other) noexcept Copy assignment. Definition BinnedStorage.h:481 BinsVecWrapper< BinsVecT > bins(const bool includeOverflows=false, const bool includeMaskedBins=false) noexcept Returns bins vector wrapper, which skips masked elements when iterated over. Definition BinnedStorage.h:298 const BinningT & binning() const noexcept Returns dimension underlying binning object reference. Definition BinnedStorage.h:321 FillableStorage, introduces FillAdapterT on top of BinnedStorage base class. Definition FillableStorage.h:87 int fill(FillCoordsT &&coords, const double weight=1.0, const double fraction=1.0) noexcept Triggers fill adapter on the bin corresponding to coords. Definition FillableStorage.h:188 std::function< void(BinT &, FillCoordsT &&, double, double)> FillAdapterT Adapter type (type of lambda used to access stored object). Definition FillableStorage.h:115 FillableStorage(Axis< AxisT > &&... axes, FillAdapterT adapter=AdapterWrapperT()._adapter) Constructs binning from an adapter and a sequence of Rvalue axes. Definition FillableStorage.h:145 void setNanLog(size_t count, double sumw, double sumw2) Definition FillableStorage.h:205 int fill(FillCoordsT &&coords, std::index_sequence< Is... >, const double weight=1.0, const double fraction=1.0) noexcept Triggers fill adapter on the bin corresponding to coords. Definition FillableStorage.h:169 FillableStorage & operator=(const FillableStorage &other) noexcept Copy assignment. Definition FillableStorage.h:226 FillableStorage(std::vector< AxisT > &&... edges, FillAdapterT adapter=AdapterWrapperT()._adapter) Constructs binning from an adapter and Rvalue vectors of axes' edges. Definition FillableStorage.h:137 FillableStorage(BinningT &&binning, FillAdapterT adapter=AdapterWrapperT()._adapter) Constructs FillableStorage from Binning. Rvalue. Definition FillableStorage.h:129 FillableStorage(const Axis< AxisT > &... axes, FillAdapterT adapter=AdapterWrapperT()._adapter) Constructs binning from an adapter and a sequence of axes. Definition FillableStorage.h:141 FillableStorage & operator-=(const FillableStorage &other) Subtract another BinnedStorage from this one. Definition FillableStorage.h:263 FillableStorage(FillAdapterT adapter=AdapterWrapperT()._adapter) Nullary constructor for unique pointers etc. Definition FillableStorage.h:121 decltype(std::tuple_cat(std::declval< typename BinningT::EdgeTypesTuple >(), dblPadding(std::make_index_sequence< FillDim-sizeof...(AxisT)>{}))) FillCoordsT Definition FillableStorage.h:100 std::integral_constant< size_t, FillDim > FillDimension Fill dimension. Definition FillableStorage.h:108 FillableStorage & operator+=(const FillableStorage &other) Add another BinnedStorage to this one. Definition FillableStorage.h:250 FillableStorage(const std::vector< AxisT > &... edges, FillAdapterT adapter=AdapterWrapperT()._adapter) Constructs binning from an adapter and vectors of axes' edges. Definition FillableStorage.h:133 FillableStorage(const BinningT &binning, FillAdapterT adapter=AdapterWrapperT()._adapter) Constructs FillableStorage from Binning. Definition FillableStorage.h:125 defaultAdapter< FillDim, BinT > AdapterWrapperT Definition FillableStorage.h:97 bool containsNan(const std::tuple< Args... > &coords) Checks if a coordinate tuple has a nan. Definition Binning.h:30 double nullifyIfDiscCoord(CoordT &&, std::false_type, double null=0.0) Nullifies coordinate if it is discrete. Definition Binning.h:19 decltype(std::tuple_cat(std::declval< typename BinningT::EdgeTypesTuple >(), dblPadding(std::make_index_sequence< DbnN-BinningT::Dimension::value >{}))) FillCoords Definition FillableStorage.h:53 std::function< void(BinT< N, Dbn< DbnN >, BinningT > &, FillCoords &&, double, double)> AdapterT Definition FillableStorage.h:55 std::function< void(BinT< N, double, BinningT > &, typename BinningT::EdgeTypesTuple &&, double, double)> AdapterT Definition FillableStorage.h:25 Type to adapter mapping used when user didn't provide type adapter. Definition FillableStorage.h:16 Generated on Mon Oct 28 2024 13:47:23 for YODA - Yet more Objects for Data Analysis by 1.9.8 |