56 virtual void Init(
Int_t ndim,
const Int_t* nbins,
bool addOverflow =
false) {
62 Int_t overBins = addOverflow ? 2 : 0;
64 for (
Int_t i = 0; i < ndim; ++i) {
65 fSizes[ndim - i - 1] =
fSizes[ndim - i] * (nbins[ndim - i - 1] + overBins);
111 R__ASSERT(
fSizes == 0 &&
"Element operator can only be used on non-array element. Missing an operator[] level?");
167 return fData[linidx];
171 return fData[linidx];
175 if (!
fData)
return 0.;
176 return fData[linidx];
180 fData[linidx] = (
T) value;
184 fData[linidx] += (
T) value;
unsigned long long ULong64_t
#define ClassDef(name, id)
Buffer base class used for serializing objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
TNDArrayRef< T > operator[](Int_t idx) const
TNDArrayRef(const T *data, const Long64_t *sizes)
ClassDefNV(TNDArrayRef, 0)
void Reset(Option_t *="")
TNDArrayRef< T > operator[](Int_t idx) const
void AddAt(ULong64_t linidx, Double_t value)
void Streamer(TBuffer &R__b)
Double_t AtAsDouble(ULong64_t linidx) const
TNDArrayT(Int_t ndim, const Int_t *nbins, bool addOverflow=false)
void Init(Int_t ndim, const Int_t *nbins, bool addOverflow=false)
T At(ULong64_t linidx) const
void SetAsDouble(ULong64_t linidx, Double_t value)
T At(const Int_t *idx) const
TNDArray(Int_t ndim, const Int_t *nbins, bool addOverflow=false)
virtual void AddAt(ULong64_t linidx, Double_t value)=0
virtual Double_t AtAsDouble(ULong64_t linidx) const =0
Long64_t GetNbins() const
TNDArray & operator=(const TNDArray &)
Long64_t GetCellSize(Int_t dim) const
Long64_t GetBin(const Int_t *idx) const
virtual void Init(Int_t ndim, const Int_t *nbins, bool addOverflow=false)
virtual void Reset(Option_t *option="")=0
virtual void SetAsDouble(ULong64_t linidx, Double_t value)=0
Int_t GetNdimensions() const
TNDArray(const TNDArray &)
Mother of all ROOT objects.