YODA::BinnedStorage< BinContentT, AxisT > Class Template Reference BinnedStorage, stores the bins and coordinates access to them. More...
Inheritance diagram for YODA::BinnedStorage< BinContentT, AxisT >:
Detailed Descriptiontemplate<typename BinContentT, typename... AxisT> class YODA::BinnedStorage< BinContentT, AxisT > BinnedStorage, stores the bins and coordinates access to them. Definition at line 114 of file BinnedStorage.h. Member Typedef Documentation◆ BaseT
template<typename BinContentT , typename... AxisT>
Definition at line 121 of file BinnedStorage.h. ◆ BinDimension
template<typename BinContentT , typename... AxisT>
Definition at line 127 of file BinnedStorage.h. ◆ BinningT
template<typename BinContentT , typename... AxisT>
Convenience alias to be used in constructor. Definition at line 118 of file BinnedStorage.h. ◆ BinningType
template<typename BinContentT , typename... AxisT>
Definition at line 125 of file BinnedStorage.h. ◆ BinsVecT
template<typename BinContentT , typename... AxisT>
Definition at line 120 of file BinnedStorage.h. ◆ BinT
template<typename BinContentT , typename... AxisT>
Definition at line 119 of file BinnedStorage.h. ◆ BinType
template<typename BinContentT , typename... AxisT>
Definition at line 126 of file BinnedStorage.h. Constructor & Destructor Documentation◆ BinnedStorage() [1/10]
template<typename BinContentT , typename... AxisT>
Nullary constructor for unique pointers etc. Definition at line 134 of file BinnedStorage.h. 134 : _binning(std::vector<AxisT>{}...) {
135 fillBins();
136 }
◆ BinnedStorage() [2/10]
template<typename BinContentT , typename... AxisT>
Constructs BinnedStorage from Binning. Definition at line 139 of file BinnedStorage.h. 139 : _binning(binning) {
140 fillBins();
141 }
const BinningT & binning() const noexcept Returns dimension underlying binning object reference. Definition BinnedStorage.h:321 References YODA::BinnedStorage< BinContentT, AxisT >::fillBins(). ◆ BinnedStorage() [3/10]
template<typename BinContentT , typename... AxisT>
Constructs BinnedStorage from Binning. Rvalue. Definition at line 144 of file BinnedStorage.h. References YODA::BinnedStorage< BinContentT, AxisT >::fillBins(). ◆ BinnedStorage() [4/10]
template<typename BinContentT , typename... AxisT>
Constructs binning from an adapter and vectors of axes' edges. Definition at line 149 of file BinnedStorage.h. References YODA::BinnedStorage< BinContentT, AxisT >::fillBins(). ◆ BinnedStorage() [5/10]
template<typename BinContentT , typename... AxisT>
Constructs binning from an adapter and Rvalue vectors of axes' edges. Definition at line 154 of file BinnedStorage.h. References YODA::BinnedStorage< BinContentT, AxisT >::fillBins(). ◆ BinnedStorage() [6/10]
template<typename BinContentT , typename... AxisT>
Constructs binning from an adapter and Rvalue initializer lists of axes' edges. Definition at line 159 of file BinnedStorage.h. ◆ BinnedStorage() [7/10]
template<typename BinContentT , typename... AxisT>
Constructs binning from an adapter and a sequence of axes. Definition at line 164 of file BinnedStorage.h. References YODA::BinnedStorage< BinContentT, AxisT >::fillBins(). ◆ BinnedStorage() [8/10]
template<typename BinContentT , typename... AxisT>
Constructs binning from an adapter and a sequence of Rvalue axes. Definition at line 169 of file BinnedStorage.h. References YODA::BinnedStorage< BinContentT, AxisT >::fillBins(). ◆ BinnedStorage() [9/10]
template<typename BinContentT , typename... AxisT>
Copy constructor. Definition at line 174 of file BinnedStorage.h. References YODA::BinnedStorage< BinContentT, AxisT >::fillBins(). ◆ BinnedStorage() [10/10]
template<typename BinContentT , typename... AxisT>
Move constructor. Definition at line 179 of file BinnedStorage.h. References YODA::BinnedStorage< BinContentT, AxisT >::fillBins(). Member Function Documentation◆ bin() [1/4]
template<typename BinContentT , typename... AxisT>
Bin access using local bin indices. Definition at line 215 of file BinnedStorage.h. 215 {
217 }
References YODA::BinnedStorage< BinContentT, AxisT >::bin(). ◆ bin() [2/4]
template<typename BinContentT , typename... AxisT>
Bin access using local bin indices. Definition at line 210 of file BinnedStorage.h. References YODA::BinnedStorage< BinContentT, AxisT >::bin(). ◆ bin() [3/4]
template<typename BinContentT , typename... AxisT>
Returns Bin at idx. Definition at line 205 of file BinnedStorage.h. 205 {
206 return _bins.at(idx);
207 }
◆ bin() [4/4]
template<typename BinContentT , typename... AxisT>
Returns reference to the bin at idx.
Definition at line 200 of file BinnedStorage.h. 200 {
201 return _bins.at(idx);
202 }
Referenced by YODA::EstimateStorage< AxisT >::add(), YODA::AOReader< BinnedDbn< DbnN, AxisT... > >::assemble(), YODA::AOReader< BinnedEstimate< AxisT... > >::assemble(), YODA::BinnedDbn< 2, AxisT1, AxisT2 >::bin(), YODA::BinnedDbn< 3, AxisT1, AxisT2, AxisT3 >::bin(), YODA::BinnedDbn< 3, AxisT1, AxisT2 >::bin(), YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::bin(), YODA::BinnedDbn< 2, AxisT1, AxisT2 >::bin(), YODA::BinnedDbn< 3, AxisT1, AxisT2, AxisT3 >::bin(), YODA::BinnedDbn< 3, AxisT1, AxisT2 >::bin(), YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::bin(), YODA::BinnedDbn< 2, AxisT1, AxisT2 >::bin(), YODA::BinnedDbn< 3, AxisT1, AxisT2 >::bin(), YODA::BinnedDbn< 2, AxisT1, AxisT2 >::bin(), YODA::BinnedDbn< 3, AxisT1, AxisT2 >::bin(), YODA::BinnedDbn< 3, AxisT1, AxisT2, AxisT3 >::bin(), YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::bin(), YODA::BinnedDbn< 3, AxisT1, AxisT2, AxisT3 >::bin(), YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::bin(), YODA::BinnedStorage< BinContentT, AxisT >::bin(), YODA::BinnedStorage< BinContentT, AxisT >::bin(), YODA::BinnedStorage< BinContentT, AxisT >::binAt(), YODA::BinnedStorage< BinContentT, AxisT >::binAt(), YODA::DbnStorage< DbnN, AxisT >::deserializeContent(), YODA::divide(), YODA::divide(), YODA::efficiency(), YODA::efficiency(), YODA::DbnStorage< DbnN, AxisT >::integralRange(), YODA::DbnStorage< DbnN, AxisT >::integralRangeError(), YODA::DbnStorage< DbnN, AxisT >::operator+=(), YODA::FillableStorage< FillDim, BinContentT, AxisT >::operator+=(), YODA::DbnStorage< DbnN, AxisT >::operator+=(), YODA::DbnStorage< DbnN, AxisT >::operator-=(), YODA::FillableStorage< FillDim, BinContentT, AxisT >::operator-=(), YODA::DbnStorage< DbnN, AxisT >::operator-=(), YODA::DbnStorage< DbnN, AxisT >::scale(), YODA::DbnStorage< DbnN, AxisT >::scaleW(), YODA::DbnStorage< DbnN, AxisT >::serializeContent(), YODA::EstimateStorage< AxisT >::subtract(), YODA::WriterYODA1::writeHisto1D(), and YODA::WriterYODA1::writeProfile1D(). ◆ binAt() [1/2]
template<typename BinContentT , typename... AxisT>
Returns reference to the bin at coordinates (const version). Definition at line 226 of file BinnedStorage.h. References YODA::BinnedStorage< BinContentT, AxisT >::bin(). ◆ binAt() [2/2]
template<typename BinContentT , typename... AxisT>
Returns reference to the bin at coordinates. Definition at line 220 of file BinnedStorage.h. References YODA::BinnedStorage< BinContentT, AxisT >::bin(). Referenced by YODA::BinnedDbn< 2, AxisT1, AxisT2 >::binAt(), YODA::BinnedDbn< 3, AxisT1, AxisT2 >::binAt(), YODA::BinnedDbn< 2, AxisT1, AxisT2 >::binAt(), YODA::BinnedDbn< 3, AxisT1, AxisT2 >::binAt(), YODA::BinnedDbn< 3, AxisT1, AxisT2, AxisT3 >::binAt(), YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::binAt(), YODA::BinnedDbn< 3, AxisT1, AxisT2, AxisT3 >::binAt(), YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::binAt(), YODA::BinnedDbn< 1, AxisT >::indexAt(), YODA::BinnedDbn< 2, AxisT >::indexAt(), YODA::BinnedDbn< 2, AxisT1, AxisT2 >::indexAt(), YODA::BinnedDbn< 3, AxisT1, AxisT2 >::indexAt(), YODA::BinnedDbn< 3, AxisT1, AxisT2, AxisT3 >::indexAt(), and YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::indexAt(). ◆ binDim()
template<typename BinContentT , typename... AxisT>
Returns dimension of binning. Definition at line 326 of file BinnedStorage.h. 326 {
327 return _binning.dim();
328 }
◆ binning()
template<typename BinContentT , typename... AxisT>
Returns dimension underlying binning object reference. Definition at line 321 of file BinnedStorage.h. 321 {
322 return _binning;
323 }
Referenced by YODA::divide(), YODA::efficiency(), and YODA::BinnedStorage< BinContentT, AxisT >::mergeBins(). ◆ bins() [1/2]
template<typename BinContentT , typename... AxisT>
Const version.
Definition at line 309 of file BinnedStorage.h. 310 {
311 return BinsVecWrapper<const BinsVecT>(_bins,
312 calcIndicesToSkip(includeOverflows, includeMaskedBins));
313 }
std::vector< size_t > calcIndicesToSkip(const bool includeOverflows, const bool includeMaskedBins) const noexcept Calculates indices of bins which are marked or located in the overflow. Definition BinnedStorage.h:259 References YODA::BinnedStorage< BinContentT, AxisT >::calcIndicesToSkip(). ◆ bins() [2/2]
template<typename BinContentT , typename... AxisT>
Returns bins vector wrapper, which skips masked elements when iterated over.
Definition at line 298 of file BinnedStorage.h. 299 {
300 return BinsVecWrapper<BinsVecT>(_bins,
301 calcIndicesToSkip(includeOverflows, includeMaskedBins));
302 }
References YODA::BinnedStorage< BinContentT, AxisT >::calcIndicesToSkip(). Referenced by YODA::DbnStorage< DbnN, AxisT >::crossTerm(), YODA::DbnStorage< DbnN, AxisT >::densitySum(), YODA::divide(), YODA::divide(), YODA::DbnStorage< DbnN, AxisT >::dVol(), YODA::efficiency(), YODA::efficiency(), YODA::DbnStorage< DbnN, AxisT >::effNumEntries(), YODA::BinnedStorage< BinContentT, AxisT >::fillBins(), YODA::BinnedStorage< BinContentT, AxisT >::fillBins(), YODA::DbnStorage< DbnN, AxisT >::maxDensity(), YODA::DbnStorage< DbnN, AxisT >::mean(), YODA::DbnStorage< DbnN, AxisT >::mkEstimate(), YODA::DbnStorage< DbnN, AxisT >::mkHisto(), YODA::EstimateStorage< AxisT >::mkInert(), YODA::mkIntegral(), YODA::DbnStorage< DbnN, AxisT >::mkScatter(), YODA::DbnStorage< DbnN, AxisT >::numEntries(), YODA::DbnStorage< DbnN, AxisT >::rms(), YODA::DbnStorage< DbnN, AxisT >::stdErr(), YODA::DbnStorage< DbnN, AxisT >::sumW(), YODA::DbnStorage< DbnN, AxisT >::sumW2(), YODA::DbnStorage< DbnN, AxisT >::sumWA(), YODA::DbnStorage< DbnN, AxisT >::sumWA2(), YODA::transform(), YODA::DbnStorage< DbnN, AxisT >::variance(), YODA::WriterYODA1::writeHisto1D(), YODA::WriterYODA1::writeHisto2D(), YODA::WriterYODA1::writeProfile1D(), YODA::WriterYODA1::writeProfile2D(), and YODA::zipProfiles(). ◆ calcIndicesToSkip()
template<typename BinContentT , typename... AxisT>
Calculates indices of bins which are marked or located in the overflow. Definition at line 259 of file BinnedStorage.h. 259 {
260
261 // if there are no bins, exit early
262 if (!_binning.numBins(!includeOverflows, !includeMaskedBins)) return {};
263
264 std::vector<size_t> indicesToSkip;
265
266 // define a lambda
267 auto appendIndicesVec = [&indicesToSkip](std::vector<size_t>&& indicesVec) {
268 indicesToSkip.insert(std::end(indicesToSkip),
269 std::make_move_iterator(std::begin(indicesVec)),
270 std::make_move_iterator(std::end(indicesVec)));
271 };
272
273 // only calculate the masked indices when
274 // the masked bins are to be skipped over
275 if(!includeOverflows) {
276 appendIndicesVec(_binning.calcOverflowBinsIndices());
277 }
278
279 if (!includeMaskedBins) {
280 appendIndicesVec(_binning.maskedBins());
281 }
282
283 // sort and remove duplicates
284 std::sort(indicesToSkip.begin(), indicesToSkip.end());
285 indicesToSkip.erase( std::unique(indicesToSkip.begin(), indicesToSkip.end()),
286 indicesToSkip.end() );
287
288 return indicesToSkip;
289 }
Referenced by YODA::BinnedStorage< BinContentT, AxisT >::bins(), and YODA::BinnedStorage< BinContentT, AxisT >::bins(). ◆ clearBins()
template<typename BinContentT , typename... AxisT>
Deletes all bins and creates empty new ones.
Definition at line 350 of file BinnedStorage.h. References YODA::BinnedStorage< BinContentT, AxisT >::fillBins(). Referenced by YODA::BinnedStorage< BinContentT, AxisT >::reset(). ◆ dim()
template<typename BinContentT , typename... AxisT>
Total dimension of the object ( = number of axes + content) Definition at line 189 of file BinnedStorage.h. 189 {
190 return sizeof...(AxisT) + 1;
191 }
Referenced by YODA::BinnedStorage< BinContentT, AxisT >::maskSlice(). ◆ fillBins() [1/3]
template<typename BinContentT , typename... AxisT>
Fills bins with wrapped BinContent objects. Definition at line 536 of file BinnedStorage.h. 536 {
537 _bins.reserve(_binning.numBins());
538
539 for (size_t i = 0; i < _binning.numBins(); ++i) {
540 _bins.emplace_back(i, _binning);
541 }
542 }
Referenced by YODA::BinnedStorage< BinContentT, AxisT >::BinnedStorage(), YODA::BinnedStorage< BinContentT, AxisT >::BinnedStorage(), YODA::BinnedStorage< BinContentT, AxisT >::BinnedStorage(), YODA::BinnedStorage< BinContentT, AxisT >::BinnedStorage(), YODA::BinnedStorage< BinContentT, AxisT >::BinnedStorage(), YODA::BinnedStorage< BinContentT, AxisT >::BinnedStorage(), YODA::BinnedStorage< BinContentT, AxisT >::BinnedStorage(), YODA::BinnedStorage< BinContentT, AxisT >::BinnedStorage(), YODA::BinnedStorage< BinContentT, AxisT >::clearBins(), YODA::BinnedStorage< BinContentT, AxisT >::operator=(), and YODA::BinnedStorage< BinContentT, AxisT >::operator=(). ◆ fillBins() [2/3]
template<typename BinContentT , typename... AxisT>
Definition at line 552 of file BinnedStorage.h. 552 {
553 _bins.clear();
554 _bins.reserve(_binning.numBins());
556 _bins.emplace_back(std::move(b), _binning);
557 }
558 }
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 References YODA::BinnedStorage< BinContentT, AxisT >::bins(). ◆ fillBins() [3/3]
template<typename BinContentT , typename... AxisT>
Definition at line 544 of file BinnedStorage.h. 544 {
545 _bins.clear();
546 _bins.reserve(_binning.numBins());
548 _bins.emplace_back(b, _binning);
549 }
550 }
References YODA::BinnedStorage< BinContentT, AxisT >::bins(). ◆ isMasked()
template<typename BinContentT , typename... AxisT>
Definition at line 375 of file BinnedStorage.h. 375 {
376 return _binning.isMasked(binIndex);
377 }
Referenced by YODA::DbnStorage< DbnN, AxisT >::integralRange(), and YODA::DbnStorage< DbnN, AxisT >::integralRangeError(). ◆ isVisible()
template<typename BinContentT , typename... AxisT>
Definition at line 383 of file BinnedStorage.h. 383 {
384 return _binning.isVisible(binIndex);
385 }
◆ maskBin()
template<typename BinContentT , typename... AxisT>
Mask a bin at a given index. Definition at line 361 of file BinnedStorage.h. 361 {
362 _binning.maskBin(indexToMask, status);
363 }
Referenced by YODA::BinnedDbn< 1, AxisT >::maskBinAt(), YODA::BinnedDbn< 2, AxisT >::maskBinAt(), YODA::BinnedDbn< 3, AxisT1, AxisT2, AxisT3 >::maskBinAt(), YODA::BinnedDbn< 4, AxisT1, AxisT2, AxisT3 >::maskBinAt(), YODA::BinnedDbn< 2, AxisT1, AxisT2 >::maskBinAt(), and YODA::BinnedDbn< 3, AxisT1, AxisT2 >::maskBinAt(). ◆ maskBinAt()
template<typename BinContentT , typename... AxisT>
Mask a bin at a given set of corrdinates. Definition at line 371 of file BinnedStorage.h. 371 {
372 _binning.maskBinAt(coords, status);
373 }
◆ maskBins()
template<typename BinContentT , typename... AxisT>
Mask a range of bins. Definition at line 356 of file BinnedStorage.h. 356 {
357 _binning.maskBins(indicesToMask, status);
358 }
Referenced by YODA::DbnStorage< DbnN, AxisT >::operator+=(), YODA::DbnStorage< DbnN, AxisT >::operator+=(), YODA::DbnStorage< DbnN, AxisT >::operator-=(), and YODA::DbnStorage< DbnN, AxisT >::operator-=(). ◆ maskedBins()
template<typename BinContentT , typename... AxisT>
Definition at line 379 of file BinnedStorage.h. 379 {
380 return _binning.maskedBins();
381 }
Referenced by YODA::EstimateStorage< AxisT >::add(), YODA::divide(), YODA::divide(), YODA::DbnStorage< DbnN, AxisT >::operator+=(), YODA::DbnStorage< DbnN, AxisT >::operator-=(), and YODA::EstimateStorage< AxisT >::subtract(). ◆ maskSlice()
template<typename BinContentT , typename... AxisT>
Mask a slice of the binning at local bin index idx along axis dimesnion dim. Definition at line 366 of file BinnedStorage.h. 366 {
367 _binning.maskSlice(dim, idx, status);
368 }
size_t dim() const noexcept Total dimension of the object ( = number of axes + content) Definition BinnedStorage.h:189 References YODA::BinnedStorage< BinContentT, AxisT >::dim(). ◆ mergeBins()
template<typename BinContentT , typename... AxisT>
template<size_t... AxisNs, class RetT = void>
Merge bins from A to B at G axis.
Definition at line 399 of file BinnedStorage.h. 402 {
403 auto mergeStorageBins =
405 assert(mergeRangePair.first < mergeRangePair.second);
406
407 auto append = [&binStorage](const auto& pivotBinsIndices, const auto& binsIndicesToMerge){
408 assert(pivotBinsIndices.size() == binsIndicesToMerge.size());
409 /*for (const auto& k : binsIndicesToMerge) { std::cout << " " << k; }
410 std::cout << std::endl;
411 for (const auto& k : pivotBinsIndices) { std::cout << " " << k; }
412 std::cout << std::endl;*/
413
414 // first merge the bins based on old set of indices
415 // unless the bins are masked
416 for (size_t i = 0; i < pivotBinsIndices.size(); ++i) {
417 auto& pivotBin = binStorage[pivotBinsIndices[i]];
418 pivotBin += std::move(binStorage[binsIndicesToMerge[i]]);
419 }
420 // then erase the bins (which will change the set of indices)
421 binStorage.erase(
422 std::remove_if(binStorage.begin(), binStorage.end(), [&](const auto& b) {
423 return std::find(binsIndicesToMerge.begin(), binsIndicesToMerge.end(), b.index()) != binsIndicesToMerge.end();
424 }), binStorage.end());
425 };
426
427 ssize_t nBinRowsToBeMerged = mergeRangePair.second - mergeRangePair.first;
428
429 size_t currBinRowIdx = mergeRangePair.first;
430 size_t nextBinRowIdx = mergeRangePair.first + 1;
431 //std::cout << nBinRowsToBeMerged << " " << currBinRowIdx << " " << nextBinRowIdx << std::endl;
432
433 while (nBinRowsToBeMerged--) {
437 binning.template mergeBins<I>({currBinRowIdx, nextBinRowIdx});
438 }
439 };
440
441 ((void)mergeStorageBins(std::integral_constant<size_t, AxisNs>(), mergeRanges), ...);
442
443 }
std::vector< size_t > sliceIndices(std::vector< std::pair< size_t, std::vector< size_t > > >) const noexcept Calculates indices of bins located in the specified slices. Definition Binning.h:574 References YODA::BinnedStorage< BinContentT, AxisT >::binning(), and YODA::Binning< Axes >::sliceIndices(). ◆ mkBinnedSlices()
template<typename BinContentT , typename... AxisT>
template<size_t axisN, template< typename... > typename BinnedT, typename Func , typename = std::enable_if_t< (axisN < sizeof...(AxisT) && sizeof...(AxisT)>=2) >>
Split this BinnedStorage into a vector of BinnedStorages along axisN. The binning dimension of the returned objects are reduced by one unit.
Definition at line 452 of file BinnedStorage.h. 452 {
453
455 auto binnedSlice = _mkBinnedT<BinnedT>(_binning.template _getAxesExcept<axisN>());
456 std::vector<decltype(binnedSlice)> rtn(vecN, binnedSlice);
457 for (size_t i = 0; i < vecN; ++i) {
458
459 auto mkSlice = [&oldBins = _bins, &how2add, &binnedSlice = rtn[i]](const auto& indicesToCopy) {
460 assert(binnedSlice.numBins(true) == indicesToCopy.size());
461
462 // for any given pivot, add the content
463 // from the old slice to the new slice
464 for (size_t i = 0; i < binnedSlice.numBins(true); ++i) {
465 auto& pivotBin = binnedSlice.bin(i);
466 auto& binToCopy = oldBins[indicesToCopy[i]];
467 how2add(pivotBin, binToCopy);
468 }
469 };
470
471 // get bin slice for any given bin i along the axis that is to be
472 // sliced, then make the estimates for the new binning
473 mkSlice(_binning.sliceIndices(axisN, i + !includeOverflows));
474
475 }
476 return rtn;
477 }
size_t numBinsAt(const size_t axisN, const bool includeOverflows=false) const noexcept Number of bins in the BinnedStorage. Definition BinnedStorage.h:339 References YODA::BinnedStorage< BinContentT, AxisT... >::numBinsAt(). ◆ numBins()
template<typename BinContentT , typename... AxisT>
Number of bins in the BinnedStorage. Definition at line 331 of file BinnedStorage.h. 331 {
332 return _binning.numBins(includeOverflows, includeMaskedBins);
333 }
Referenced by YODA::DbnStorage< DbnN, AxisT >::deserializeContent(), YODA::DbnStorage< DbnN, AxisT >::integralRange(), YODA::DbnStorage< DbnN, AxisT >::integralRangeError(), YODA::DbnStorage< DbnN, AxisT >::lengthContent(), YODA::DbnStorage< DbnN, AxisT >::operator+=(), YODA::DbnStorage< DbnN, AxisT >::operator+=(), YODA::DbnStorage< DbnN, AxisT >::operator-=(), YODA::DbnStorage< DbnN, AxisT >::operator-=(), YODA::DbnStorage< DbnN, AxisT >::serializeContent(), YODA::WriterYODA1::writeHisto1D(), and YODA::WriterYODA1::writeProfile1D(). ◆ numBinsAt()
template<typename BinContentT , typename... AxisT>
Number of bins in the BinnedStorage.
Definition at line 339 of file BinnedStorage.h. 339 {
340 size_t nOverflows = includeOverflows? 0 : _binning.countOverflowBins(axisN);
341 return _binning.numBinsAt(axisN) - nOverflows;
342 }
Referenced by YODA::AOReader< BinnedDbn< DbnN, AxisT... > >::assemble(), and YODA::DbnStorage< DbnN, AxisT >::rebinBy(). ◆ operator!=()
template<typename BinContentT , typename... AxisT>
Compares BinnedStorages for inequality.
Definition at line 509 of file BinnedStorage.h. 509 {
511 }
bool operator==(const BinnedStorage &other) const noexcept Compares BinnedStorages for equality, e.g. dimensions of underlying binnings and all axes edges are e... Definition BinnedStorage.h:502 References YODA::BinnedStorage< BinContentT, AxisT >::operator==(). ◆ operator=() [1/2]
template<typename BinContentT , typename... AxisT>
Move assignment. Definition at line 490 of file BinnedStorage.h. 490 {
491 if (this != &other) {
492 _binning = std::move(other._binning);
493 fillBins(std::move(other._bins));
494 }
495 return *this;
496 }
References YODA::BinnedStorage< BinContentT, AxisT >::fillBins(). ◆ operator=() [2/2]
template<typename BinContentT , typename... AxisT>
Copy assignment. Definition at line 481 of file BinnedStorage.h. 481 {
482 if (this != &other) {
483 _binning = other._binning;
484 fillBins(other._bins);
485 }
486 return *this;
487 }
References YODA::BinnedStorage< BinContentT, AxisT >::fillBins(). ◆ operator==()
template<typename BinContentT , typename... AxisT>
Compares BinnedStorages for equality, e.g. dimensions of underlying binnings and all axes edges are equal.
Definition at line 502 of file BinnedStorage.h. 502 {
503 return _binning.isCompatible(other._binning);
504 }
Referenced by YODA::BinnedStorage< BinContentT, AxisT >::operator!=(). ◆ reset()
template<typename BinContentT , typename... AxisT>
Reset the BinnedStorage. Definition at line 345 of file BinnedStorage.h. 345{ clearBins(); }
References YODA::BinnedStorage< BinContentT, AxisT >::clearBins(). ◆ set() [1/4]
template<typename BinContentT , typename... AxisT>
Sets the bin corresponding to binIndex with an rvalue content.
Definition at line 248 of file BinnedStorage.h. 248 {
249 _bins[binIdx] = std::move(content);
250 }
◆ set() [2/4]
template<typename BinContentT , typename... AxisT>
Sets the bin corresponding to binIndex with content. Definition at line 253 of file BinnedStorage.h. 253 {
254 _bins[binIdx] = content;
255 }
◆ set() [3/4]
template<typename BinContentT , typename... AxisT>
Sets the bin corresponding to coords with an rvalue content.
Definition at line 234 of file BinnedStorage.h. 234 {
235 const size_t binIdx = _binning.globalIndexAt(coords);
236 _bins[binIdx] = std::move(content);
237 }
◆ set() [4/4]
template<typename BinContentT , typename... AxisT>
Sets the bin corresponding to coords with content. Definition at line 240 of file BinnedStorage.h. 240 {
241 const size_t binIdx = _binning.globalIndexAt(coords);
242 _bins[binIdx] = content;
243 }
The documentation for this class was generated from the following file:
Generated on Mon Oct 28 2024 13:47:24 for YODA - Yet more Objects for Data Analysis by 1.9.8 |