|
Go to the documentation of this file. 1 #ifndef NPSTAT_HISTOND_HH_
2 #define NPSTAT_HISTOND_HH_
44 template < typename Numeric, class Axis=HistoAxis>
47 template < typename Num2, class Axis2> friend class HistoND;
50 typedef Numeric value_type;
51 typedef Axis axis_type;
68 HistoND( const Axis& xAxis, const Axis& yAxis,
72 HistoND( const Axis& xAxis, const Axis& yAxis, const Axis& zAxis,
77 const Axis& a2, const Axis& a3,
82 const Axis& a2, const Axis& a3, const Axis& a4,
86 HistoND( const Axis& a0, const Axis& a1, const Axis& a2,
87 const Axis& a3, const Axis& a4, const Axis& a5,
91 HistoND( const Axis& a0, const Axis& a1, const Axis& a2,
92 const Axis& a3, const Axis& a4, const Axis& a5, const Axis& a6,
96 HistoND( const Axis& a0, const Axis& a1, const Axis& a2,
97 const Axis& a3, const Axis& a4, const Axis& a5,
98 const Axis& a6, const Axis& a7,
102 HistoND( const Axis& a0, const Axis& a1, const Axis& a2,
103 const Axis& a3, const Axis& a4, const Axis& a5,
104 const Axis& a6, const Axis& a7, const Axis& a8,
108 HistoND( const Axis& a0, const Axis& a1, const Axis& a2,
109 const Axis& a3, const Axis& a4, const Axis& a5,
110 const Axis& a6, const Axis& a7, const Axis& a8, const Axis& a9,
127 template < typename Num2, class Functor>
138 template < typename Num2>
140 unsigned nIndices, const char* title=0);
151 template < typename Num2>
153 unsigned newAxisNumber, const char* title=0);
172 template < typename Num2>
174 const unsigned *newBinCounts, unsigned lenNewBinCounts,
175 const double* shifts=0, const char* title=0);
187 inline unsigned dim() const { return dim_;}
190 inline const std::string& title() const { return title_;}
194 { return accumulatedDataLabel_;}
207 { return overflowSum(axisNumber, 0U);}
208 inline Numeric overflowWeight( unsigned axisNumber) const
209 { return overflowSum(axisNumber, 2U);}
216 { return overflowSum(axisNumber, 1U);}
219 inline const std::vector<Axis>& axes() const { return axes_;}
222 inline const Axis& axis( const unsigned i) const
223 { return axes_.at(i);}
233 { return fillCount_ - overCount_;}
247 std::vector<double> upperAxisLimits() const;
248 std::vector<double> axisLengths() const;
253 {title_ = newtitle ? newtitle : ""; ++modCount_;}
257 {accumulatedDataLabel_ = newlabel ? newlabel : ""; ++modCount_;}
261 {axes_.at(axisNum).setLabel(newlabel); ++modCount_;}
275 double* coords, unsigned lenCoords) const;
284 template < class Po int>
330 template < typename Num2>
331 void fill( const double* coords, unsigned coordLength,
335 template < typename Num2>
336 inline void fill( const std::vector<double>& c, const Num2& weight)
338 const unsigned long sz = c.size();
339 const unsigned long nFills = sz/dim_;
340 if (sz % dim_) throw std::invalid_argument(
341 "In npstat::HistoND::fill: incompatible sample size");
342 const double* buf = 0;
343 if (!c.empty()) buf = &c[0];
344 for ( unsigned long i=0; i<nFills; ++i)
346 fill(buf, dim_, weight);
356 template < typename Num2>
357 inline void fill( const std::vector<std::pair<double,Num2> >& c)
359 if (dim_ != 1U) throw std::invalid_argument(
360 "In npstat::HistoND::fill: flat vector of weighted "
361 "coordinates can only be used to fill 1-d histograms");
362 const unsigned long sz = c.size();
365 const std::pair<double,Num2>* buf = &c[0];
366 for ( unsigned long i=0; i<sz; ++i, ++buf)
367 fill(&buf->first, 1U, buf->second);
376 template < typename Num2>
379 template < typename Num2>
380 void fill( double x0, const Num2& weight);
382 template < typename Num2>
383 void fill( double x0, double x1, const Num2& weight);
385 template < typename Num2>
386 void fill( double x0, double x1, double x2, const Num2& weight);
388 template < typename Num2>
389 void fill( double x0, double x1, double x2, double x3,
392 template < typename Num2>
393 void fill( double x0, double x1, double x2, double x3, double x4,
396 template < typename Num2>
397 void fill( double x0, double x1, double x2, double x3, double x4,
398 double x5, const Num2& weight);
400 template < typename Num2>
401 void fill( double x0, double x1, double x2, double x3, double x4,
402 double x5, double x6, const Num2& weight);
404 template < typename Num2>
405 void fill( double x0, double x1, double x2, double x3, double x4,
406 double x5, double x6, double x7, const Num2& weight);
408 template < typename Num2>
409 void fill( double x0, double x1, double x2, double x3, double x4,
410 double x5, double x6, double x7, double x8,
413 template < typename Num2>
414 void fill( double x0, double x1, double x2, double x3, double x4,
415 double x5, double x6, double x7, double x8, double x9,
432 template < typename Num2, class Functor>
433 void dispatch( const double* coords, unsigned coordLength,
434 Num2& weight, Functor& f);
441 template < typename Num2, class Functor>
444 template < typename Num2, class Functor>
445 void dispatch( double x0, Num2& weight, Functor& f);
447 template < typename Num2, class Functor>
448 void dispatch( double x0, double x1, Num2& weight, Functor& f);
450 template < typename Num2, class Functor>
451 void dispatch( double x0, double x1, double x2, Num2& weight,
454 template < typename Num2, class Functor>
455 void dispatch( double x0, double x1, double x2, double x3,
456 Num2& weight, Functor& f);
458 template < typename Num2, class Functor>
459 void dispatch( double x0, double x1, double x2, double x3, double x4,
460 Num2& weight, Functor& f);
462 template < typename Num2, class Functor>
463 void dispatch( double x0, double x1, double x2, double x3, double x4,
464 double x5, Num2& weight, Functor& f);
466 template < typename Num2, class Functor>
467 void dispatch( double x0, double x1, double x2, double x3, double x4,
468 double x5, double x6, Num2& weight, Functor& f);
470 template < typename Num2, class Functor>
471 void dispatch( double x0, double x1, double x2, double x3, double x4,
472 double x5, double x6, double x7, Num2& weight,
475 template < typename Num2, class Functor>
476 void dispatch( double x0, double x1, double x2, double x3, double x4,
477 double x5, double x6, double x7, double x8,
478 Num2& weight, Functor& f);
480 template < typename Num2, class Functor>
481 void dispatch( double x0, double x1, double x2, double x3, double x4,
482 double x5, double x6, double x7, double x8, double x9,
483 Num2& weight, Functor& f);
493 unsigned coordLength) const;
502 const Numeric& examine( double x0) const;
504 const Numeric& examine( double x0, double x1) const;
506 const Numeric& examine( double x0, double x1, double x2) const;
508 const Numeric& examine( double x0, double x1, double x2,
511 const Numeric& examine( double x0, double x1, double x2, double x3,
514 const Numeric& examine( double x0, double x1, double x2, double x3,
515 double x4, double x5) const;
517 const Numeric& examine( double x0, double x1, double x2, double x3,
518 double x4, double x5, double x6) const;
520 const Numeric& examine( double x0, double x1, double x2, double x3,
521 double x4, double x5, double x6,
524 const Numeric& examine( double x0, double x1, double x2, double x3,
525 double x4, double x5, double x6, double x7,
528 const Numeric& examine( double x0, double x1, double x2, double x3,
529 double x4, double x5, double x6, double x7,
530 double x8, double x9) const;
540 unsigned coordLength) const;
551 const Numeric& closestBin( double x0, double x1) const;
553 const Numeric& closestBin( double x0, double x1, double x2) const;
555 const Numeric& closestBin( double x0, double x1, double x2,
558 const Numeric& closestBin( double x0, double x1, double x2, double x3,
561 const Numeric& closestBin( double x0, double x1, double x2, double x3,
562 double x4, double x5) const;
564 const Numeric& closestBin( double x0, double x1, double x2, double x3,
565 double x4, double x5, double x6) const;
567 const Numeric& closestBin( double x0, double x1, double x2, double x3,
568 double x4, double x5, double x6,
571 const Numeric& closestBin( double x0, double x1, double x2, double x3,
572 double x4, double x5, double x6, double x7,
575 const Numeric& closestBin( double x0, double x1, double x2, double x3,
576 double x4, double x5, double x6, double x7,
577 double x8, double x9) const;
602 template < typename Num2>
603 void fillC( const double* coords, unsigned coordLength,
607 template < typename Num2>
608 inline void fillC( const std::vector<double>& c, const Num2& weight)
610 const unsigned long sz = c.size();
611 const unsigned long nFills = sz/dim_;
612 if (sz % dim_) throw std::invalid_argument(
613 "In npstat::HistoND::fillC: incompatible sample size");
614 const double* buf = 0;
615 if (!c.empty()) buf = &c[0];
616 for ( unsigned long i=0; i<nFills; ++i)
618 fillC(buf, dim_, weight);
628 template < typename Num2>
629 inline void fillC( const std::vector<std::pair<double,Num2> >& c)
631 if (dim_ != 1U) throw std::invalid_argument(
632 "In npstat::HistoND::fillC: flat vector of weighted "
633 "coordinates can only be used to fill 1-d histograms");
634 const unsigned long sz = c.size();
637 const std::pair<double,Num2>* buf = &c[0];
638 for ( unsigned long i=0; i<sz; ++i, ++buf)
639 fillC(&buf->first, 1U, buf->second);
648 template < typename Num2>
651 template < typename Num2>
652 void fillC( double x0, const Num2& weight);
654 template < typename Num2>
655 void fillC( double x0, double x1, const Num2& weight);
657 template < typename Num2>
658 void fillC( double x0, double x1, double x2, const Num2& weight);
660 template < typename Num2>
661 void fillC( double x0, double x1, double x2, double x3,
664 template < typename Num2>
665 void fillC( double x0, double x1, double x2, double x3, double x4,
668 template < typename Num2>
669 void fillC( double x0, double x1, double x2, double x3, double x4,
670 double x5, const Num2& weight);
672 template < typename Num2>
673 void fillC( double x0, double x1, double x2, double x3, double x4,
674 double x5, double x6, const Num2& weight);
676 template < typename Num2>
677 void fillC( double x0, double x1, double x2, double x3, double x4,
678 double x5, double x6, double x7, const Num2& weight);
680 template < typename Num2>
681 void fillC( double x0, double x1, double x2, double x3, double x4,
682 double x5, double x6, double x7, double x8,
685 template < typename Num2>
686 void fillC( double x0, double x1, double x2, double x3, double x4,
687 double x5, double x6, double x7, double x8, double x9,
695 template < typename Num2>
707 template < typename Num2>
712 template < typename Num2>
713 void setBin( const unsigned *index, unsigned indexLen, const Num2& v);
715 template < typename Num2>
716 void setBin( const Num2& v);
718 template < typename Num2>
719 void setBin( unsigned i0, const Num2& v);
721 template < typename Num2>
722 void setBin( unsigned i0, unsigned i1, const Num2& v);
724 template < typename Num2>
725 void setBin( unsigned i0, unsigned i1, unsigned i2, const Num2& v);
727 template < typename Num2>
728 void setBin( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
731 template < typename Num2>
732 void setBin( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
733 unsigned i4, const Num2& v);
735 template < typename Num2>
736 void setBin( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
737 unsigned i4, unsigned i5, const Num2& v);
739 template < typename Num2>
740 void setBin( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
741 unsigned i4, unsigned i5, unsigned i6, const Num2& v);
743 template < typename Num2>
744 void setBin( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
745 unsigned i4, unsigned i5, unsigned i6, unsigned i7,
748 template < typename Num2>
749 void setBin( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
750 unsigned i4, unsigned i5, unsigned i6, unsigned i7,
751 unsigned i8, const Num2& v);
753 template < typename Num2>
754 void setBin( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
755 unsigned i4, unsigned i5, unsigned i6, unsigned i7,
756 unsigned i8, unsigned i9, const Num2& v);
758 template < typename Num2>
759 inline void setLinearBin( const unsigned long index, const Num2& v)
765 template < typename Num2>
766 void setBinAt( const unsigned *index, unsigned indexLen, const Num2& v);
768 template < typename Num2>
771 template < typename Num2>
772 void setBinAt( unsigned i0, const Num2& v);
774 template < typename Num2>
775 void setBinAt( unsigned i0, unsigned i1, const Num2& v);
777 template < typename Num2>
778 void setBinAt( unsigned i0, unsigned i1, unsigned i2, const Num2& v);
780 template < typename Num2>
781 void setBinAt( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
784 template < typename Num2>
785 void setBinAt( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
786 unsigned i4, const Num2& v);
788 template < typename Num2>
789 void setBinAt( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
790 unsigned i4, unsigned i5, const Num2& v);
792 template < typename Num2>
793 void setBinAt( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
794 unsigned i4, unsigned i5, unsigned i6, const Num2& v);
796 template < typename Num2>
797 void setBinAt( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
798 unsigned i4, unsigned i5, unsigned i6, unsigned i7,
801 template < typename Num2>
802 void setBinAt( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
803 unsigned i4, unsigned i5, unsigned i6, unsigned i7,
804 unsigned i8, const Num2& v);
806 template < typename Num2>
807 void setBinAt( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
808 unsigned i4, unsigned i5, unsigned i6, unsigned i7,
809 unsigned i8, unsigned i9, const Num2& v);
811 template < typename Num2>
812 inline void setLinearBinAt( const unsigned long index, const Num2& v)
817 template < typename Num2>
822 template < typename Num2>
829 template < typename Num2>
837 template < typename Num2>
839 {overflow_. constFill(value); ++modCount_;}
855 {fillCount_ = i; ++modCount_;}
856 inline void setNFillsOver( const unsigned long i)
857 {overCount_ = i; ++modCount_;}
861 template < typename Num2>
865 template < typename Num2>
870 template < typename Num2>
873 template < typename Num2>
874 void scaleOverflows( const Num2* data, unsigned long dataLength);
882 template < typename Num2>
885 template < typename Num2>
886 void addToOverflows( const Num2& weight);
895 template < typename Num2>
898 template < typename Num2>
899 void addToOverflows( const Num2* data, unsigned long dataLength);
910 template < typename Acc>
912 bool calculateAverage = false) const;
925 template < typename Num2, typename Num3>
928 const unsigned *projectedIndices,
929 unsigned nProjectedIndices) const;
931 template < typename Num2, typename Num3>
934 const unsigned *projectedIndices,
935 unsigned nProjectedIndices) const;
964 inline gs::ClassId classId() const { return gs::ClassId(* this);}
965 bool write(std::ostream& of) const;
968 static const char* classname();
969 static inline unsigned version() { return 1;}
970 static HistoND* read( const gs::ClassId& id, std::istream& in);
977 HistoND( const HistoND& r, unsigned ax1, unsigned ax2);
979 template < typename Num2>
980 void fillPreservingCentroid( const Num2& weight);
982 template < typename Acc>
983 void accumulateBinsLoop( unsigned level, const BoxND<double>& box,
984 unsigned* idx, Acc* accumulator,
985 double overlapFraction, long double* wsum) const;
987 Numeric overflowSum( unsigned indexToFix, unsigned fixValue) const;
990 std::string accumulatedDataLabel_;
991 ArrayND<Numeric> data_;
992 ArrayND<Numeric> overflow_;
993 std::vector<Axis> axes_;
994 mutable std::vector<double> weightBuf_;
995 mutable std::vector<unsigned> indexBuf_;
996 unsigned long fillCount_;
997 unsigned long overCount_;
998 unsigned long modCount_;
1004 inline Numeric examine2( const std::vector<double>& c) const
1006 const unsigned sz = c.size();
1007 return examine(sz ? &c[0] : ( double*)0, sz);
1010 inline Numeric examine2() const
1013 inline Numeric examine2( double x0) const
1016 inline Numeric examine2( double x0, double x1) const
1019 inline Numeric examine2( double x0, double x1, double x2) const
1022 inline Numeric examine2( double x0, double x1, double x2,
1024 { return examine(x0, x1, x2, x3);}
1026 inline Numeric examine2( double x0, double x1, double x2, double x3,
1028 { return examine(x0, x1, x2, x3, x4);}
1030 inline Numeric examine2( double x0, double x1, double x2, double x3,
1031 double x4, double x5) const
1032 { return examine(x0, x1, x2, x3, x4, x5);}
1034 inline Numeric examine2( double x0, double x1, double x2, double x3,
1035 double x4, double x5, double x6) const
1036 { return examine(x0, x1, x2, x3, x4, x5, x6);}
1038 inline Numeric examine2( double x0, double x1, double x2, double x3,
1039 double x4, double x5, double x6,
1041 { return examine(x0, x1, x2, x3, x4, x5, x6, x7);}
1043 inline Numeric examine2( double x0, double x1, double x2, double x3,
1044 double x4, double x5, double x6, double x7,
1046 { return examine(x0, x1, x2, x3, x4, x5, x6, x7, x8);}
1048 inline Numeric examine2( double x0, double x1, double x2, double x3,
1049 double x4, double x5, double x6, double x7,
1050 double x8, double x9) const
1051 { return examine(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);}
1053 inline Numeric closestBin2( const std::vector<double>& c) const
1055 const unsigned sz = c.size();
1056 return closestBin(sz ? &c[0] : ( double*)0, sz);
1059 inline Numeric closestBin2() const
1062 inline Numeric closestBin2( double x0) const
1065 inline Numeric closestBin2( double x0, double x1) const
1068 inline Numeric closestBin2( double x0, double x1, double x2) const
1071 inline Numeric closestBin2( double x0, double x1, double x2,
1075 inline Numeric closestBin2( double x0, double x1, double x2, double x3,
1079 inline Numeric closestBin2( double x0, double x1, double x2, double x3,
1080 double x4, double x5) const
1083 inline Numeric closestBin2( double x0, double x1, double x2, double x3,
1084 double x4, double x5, double x6) const
1085 { return closestBin(x0, x1, x2, x3, x4, x5, x6);}
1087 inline Numeric closestBin2( double x0, double x1, double x2, double x3,
1088 double x4, double x5, double x6,
1090 { return closestBin(x0, x1, x2, x3, x4, x5, x6, x7);}
1092 inline Numeric closestBin2( double x0, double x1, double x2, double x3,
1093 double x4, double x5, double x6, double x7,
1095 { return closestBin(x0, x1, x2, x3, x4, x5, x6, x7, x8);}
1097 inline Numeric closestBin2( double x0, double x1, double x2, double x3,
1098 double x4, double x5, double x6, double x7,
1099 double x8, double x9) const
1100 { return closestBin(x0, x1, x2, x3, x4, x5, x6, x7, x8, x9);}
1102 inline void setBin2( const std::vector<unsigned>& index, Numeric v)
1104 const unsigned sz = index.size();
1105 setBinAt(sz ? &index[0] : ( unsigned*)0, sz, v);
1108 inline void setBin2(Numeric v)
1111 inline void setBin2( unsigned i0, Numeric v)
1114 inline void setBin2( unsigned i0, unsigned i1, Numeric v)
1117 inline void setBin2( unsigned i0, unsigned i1, unsigned i2, Numeric v)
1120 inline void setBin2( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
1124 inline void setBin2( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
1125 unsigned i4, Numeric v)
1128 inline void setBin2( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
1129 unsigned i4, unsigned i5, Numeric v)
1130 { setBinAt(i0, i1, i2, i3, i4, i5, v);}
1132 inline void setBin2( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
1133 unsigned i4, unsigned i5, unsigned i6, Numeric v)
1134 { setBinAt(i0, i1, i2, i3, i4, i5, i6, v);}
1136 inline void setBin2( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
1137 unsigned i4, unsigned i5, unsigned i6, unsigned i7,
1139 { setBinAt(i0, i1, i2, i3, i4, i5, i6, i7, v);}
1141 inline void setBin2( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
1142 unsigned i4, unsigned i5, unsigned i6, unsigned i7,
1143 unsigned i8, Numeric v)
1144 { setBinAt(i0, i1, i2, i3, i4, i5, i6, i7, i8, v);}
1146 inline void setBin2( unsigned i0, unsigned i1, unsigned i2, unsigned i3,
1147 unsigned i4, unsigned i5, unsigned i6, unsigned i7,
1148 unsigned i8, unsigned i9, Numeric v)
1149 { setBinAt(i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, v);}
1151 inline void setLinearBin2( const unsigned long index, Numeric v)
1152 {data_.linearValueAt(index) = v; ++modCount_;}
1154 inline void setBinsToConst2( const Numeric value)
1155 {data_.constFill(value); ++modCount_;}
1157 inline void setOverflowsToConst2( const Numeric value)
1158 {overflow_.constFill(value); ++modCount_;}
1160 inline std::vector<Axis> axes2() const
1163 inline std::vector<double> binWidths() const
1166 "In npstat::HistoND::binWidths: the histogram "
1167 "is not uniformly binned");
1168 std::vector<double> bw(dim_);
1169 for ( unsigned i=0; i<dim_; ++i)
1170 bw[i] = axes_[i].binWidth(0);
1176 const unsigned* sh = data_.shapeData();
1196 template < typename Histo>
1204 template < typename Histo>
1217 template < typename Histo>
1219 bool doubleDataRange);
1222 #include "npstat/stat/HistoND.icc"
Arbitrary-dimensional array template.
Histogram axis with equidistant bins.
ArrayND & constFill(Numeric c)
unsigned long length() const Definition: ArrayND.hh:320
Numeric & linearValue(unsigned long index)
Numeric & linearValueAt(unsigned long index)
Definition: HistoND.hh:46
void setAccumulatedDataLabel(const char *newlabel) Definition: HistoND.hh:256
const Axis & axis(const unsigned i) const Definition: HistoND.hh:222
const ArrayND< Numeric > & binContents() const Definition: HistoND.hh:197
void setTitle(const char *newtitle) Definition: HistoND.hh:252
HistoND & operator-=(const HistoND< Num2, Axis > &r)
const std::vector< Axis > & axes() const Definition: HistoND.hh:219
HistoND transpose(unsigned axisNum1, unsigned axisNum2) const
void addToProjection(HistoND< Num2, Axis > *projection, AbsArrayProjector< Numeric, Num3 > &projector, const unsigned *projectedIndices, unsigned nProjectedIndices) const
void dispatch(const double *coords, unsigned coordLength, Num2 &weight, Functor &f)
void accumulateBinsInBox(const BoxND< double > &box, Acc *acc, bool calculateAverage=false) const
void fill(const Num2 &weight)
void binBox(unsigned long binNumber, BoxND< double > *box) const
HistoND(const Axis &xAxis, const Axis &yAxis, const char *title=0, const char *accumulatedDataLabel=0)
void setAxisLabel(const unsigned axisNum, const char *newlabel) Definition: HistoND.hh:260
HistoND(const HistoND< Num2, Axis > &h, const unsigned *indices, unsigned nIndices, const char *title=0)
void fill(const std::vector< std::pair< double, Num2 > > &c) Definition: HistoND.hh:357
void addToBinContents(const Num2 &weight)
unsigned long getModCount() const Definition: HistoND.hh:953
void fillC(const Num2 &weight)
BoxND< double > boundingBox() const
bool operator==(const HistoND &) const
const Numeric & closestBin() const
void setOverflowsToConst(const Num2 &value) Definition: HistoND.hh:838
double binVolume(unsigned long binNumber=0) const
void setBinAt(const unsigned *index, unsigned indexLen, const Num2 &v)
HistoND(const Axis &a0, const Axis &a1, const Axis &a2, const Axis &a3, const Axis &a4, const Axis &a5, const Axis &a6, const Axis &a7, const Axis &a8, const Axis &a9, const char *title=0, const char *accumulatedDataLabel=0)
HistoND & operator=(const HistoND &)
bool isSameData(const HistoND &) const
Numeric inRangeOverWeight(unsigned axisNumber) const Definition: HistoND.hh:215
HistoND(const Axis &a0, const Axis &a1, const Axis &a2, const Axis &a3, const Axis &a4, const Axis &a5, const char *title=0, const char *accumulatedDataLabel=0)
HistoND(const HistoND< Num2, Axis > &h, const Axis &newAxis, unsigned newAxisNumber, const char *title=0)
const Numeric & closestBin(const double *coords, unsigned coordLength) const
gs::ClassId classId() const Definition: HistoND.hh:964
const std::string & accumulatedDataLabel() const Definition: HistoND.hh:193
void incrModCount() Definition: HistoND.hh:960
HistoND(const Axis &a0, const Axis &a1, const Axis &a2, const Axis &a3, const Axis &a4, const Axis &a5, const Axis &a6, const char *title=0, const char *accumulatedDataLabel=0)
HistoND(const std::vector< Axis > &axes, const char *title=0, const char *accumulatedDataLabel=0)
const Numeric & examine() const
unsigned long nBins() const Definition: HistoND.hh:226
void setOverflows(const Num2 *data, unsigned long dataLength)
HistoND(const Axis &a0, const Axis &a1, const Axis &a2, const Axis &a3, const char *title=0, const char *accumulatedDataLabel=0)
HistoND(const Axis &xAxis, const Axis &yAxis, const Axis &zAxis, const char *title=0, const char *accumulatedDataLabel=0)
const std::string & title() const Definition: HistoND.hh:190
HistoND(const HistoND< Num2, Axis > &h, const Functor &f, const char *title=0, const char *accumulatedDataLabel=0)
void addToBinContents(const Num2 *data, unsigned long dataLength)
void fillC(const std::vector< std::pair< double, Num2 > > &c) Definition: HistoND.hh:629
unsigned long nFillsInRange() const Definition: HistoND.hh:232
void setBinContents(const Num2 *data, unsigned long dataLength, bool clearOverflows=true)
void fillC(const double *coords, unsigned coordLength, const Num2 &weight)
unsigned dim() const Definition: HistoND.hh:187
HistoND(const Axis &a0, const Axis &a1, const Axis &a2, const Axis &a3, const Axis &a4, const Axis &a5, const Axis &a6, const Axis &a7, const char *title=0, const char *accumulatedDataLabel=0)
HistoND & operator/=(const Num2 &r)
void recalculateNFillsFromData()
HistoND(const Axis &a0, const Axis &a1, const Axis &a2, const Axis &a3, const Axis &a4, const char *title=0, const char *accumulatedDataLabel=0)
HistoND(const Axis &xAxis, const char *title=0, const char *accumulatedDataLabel=0)
bool operator!=(const HistoND &) const
unsigned long nFillsOver() const Definition: HistoND.hh:236
void dispatch(Num2 &weight, Functor &f)
HistoND & operator+=(const HistoND< Num2, Axis > &r)
bool isUniformlyBinned() const
void scaleBinContents(const Num2 *data, unsigned long dataLength)
std::vector< double > lowerAxisLimits() const
void allBinCenters(std::vector< Point > *centers) const
void setBin(const unsigned *index, unsigned indexLen, const Num2 &v)
void binCenter(unsigned long binNumber, double *coords, unsigned lenCoords) const
void fillC(const std::vector< double > &c, const Num2 &weight) Definition: HistoND.hh:608
void fill(const double *coords, unsigned coordLength, const Num2 &weight)
void setBinsToConst(const Num2 &value) Definition: HistoND.hh:830
HistoND(const Axis &a0, const Axis &a1, const Axis &a2, const Axis &a3, const Axis &a4, const Axis &a5, const Axis &a6, const Axis &a7, const Axis &a8, const char *title=0, const char *accumulatedDataLabel=0)
void fill(const std::vector< double > &c, const Num2 &weight) Definition: HistoND.hh:336
HistoND & operator*=(const Num2 &r)
unsigned long nFillsTotal() const Definition: HistoND.hh:229
Numeric underflowWeight(unsigned axisNumber) const Definition: HistoND.hh:206
void setNFillsTotal(const unsigned long i) Definition: HistoND.hh:854
HistoND(const ArrayShape &shape, const BoxND< double > &boundingBox, const char *title=0, const char *accumulatedDataLabel=0)
const ArrayND< Numeric > & overflows() const Definition: HistoND.hh:200
const Numeric & examine(const double *coords, unsigned coordLength) const
HistoND(const HistoND< Num2, Axis > &h, RebinType rType, const unsigned *newBinCounts, unsigned lenNewBinCounts, const double *shifts=0, const char *title=0)
Definition: AbsArrayProjector.hh:14
std::vector< unsigned > ArrayShape Definition: ArrayShape.hh:21
std::vector< CircularMapper1d > convolutionHistoMap(const Histo &histo, bool doubleDataRange)
void convertHistoToDensity(Histo *histogram, bool knownNonNegative=false)
std::vector< LinearMapper1d > densityScanHistoMap(const Histo &histo)
Definition: AbsArrayProjector.hh:21
Definition: AbsVisitor.hh:20
|